【发布时间】:2018-08-06 10:21:43
【问题描述】:
仍在解决很多问题,可以使用您的帮助 atm。我不能让我的标题列表位于页面的中心。
我的 HTML 代码:
<header>
<ul>
<li><h5 class="button rightborder">Blog</h5></li>
<li><h5 class="button">List Builder [WIP]</h5></li>
<li><h5 class="button border title">CERBERUS</h5></li>
<li><h5 class="button rightborder">Math Hammer</h5></li>
<li><h5 class="button">Other</h5></li>
</ul>
</header>
还有我的 CSS 代码:
body {
background: black url("./background.jpg") no-repeat fixed center;
}
header {
border-bottom: 1px double white;
width: 100%;
position: center;
}
h5 {
color: white;
font-family: Helvetica;
font-size: 18px;
}
li {
display: inline-block;
text-align: center;
}
我希望你们能理解我的问题并能够提供帮助。
提前非常感谢您!
【问题讨论】:
-
离题:您似乎正在使用标题元素 (H5) 进行样式设置。请不要。 webaim.org/techniques/semanticstructure/#correctly
-
感谢您。还是要学东西。这种东西很有帮助。一个例子会更好,但就像已经说过的帮助一样!