【发布时间】:2021-01-20 23:04:33
【问题描述】:
我试过了,但页脚没有居中。我尝试放置 display: block 或 inline-block 但这对我也没有帮助。
HTML:
<div id="secondfooter">
<p>COPYRIGHT 2020 HYUNDAI AUTO ROMANIA. TOATE DREPTURILE REZERVATE.</p>
</div>
CSS:
#secondfooter {
width: 900px;
margin: auto;
font-size: 13px;
background: #c00000;
font-family: arial;
text-align: center;
color: white;
float: left;
}
这里是 jsfiddle 链接:
【问题讨论】:
-
它在jfiddle中居中,困惑。
-
你在使用引导程序吗?