我想在页脚底部之后在底部放置半英寸的黑色。如何在底部页脚底部加黑色
我试图
CSS
#footerCol
{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
margin: 0;
font-size: .9em;
}
HTML:
<div id="footerCol"> </div>
我想在页脚底部之后在底部放置半英寸的黑色。如何在底部页脚底部加黑色
我试图
CSS
#footerCol
{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
margin: 0;
font-size: .9em;
}
HTML:
<div id="footerCol"> </div>
您需要使用边框顶部
#footerCol{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
border-top: 5px solid #000;
margin: 0;
font-size: .9em;
}
当你说 “后”,我想你指的是 “后”: -
<head>
<meta charset="utf-8" />
<title>answer</title>
<style>
body{
margin:0;
}
#footerCol {
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
margin: 0;
font-size: .9em;
}
#footerCol::after {
content: "";
display: block;
background-color: black;
height: 20px;
}
</style>
</head>
<body>
<div>
<asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server" />
</div>
<div id="footerCol">
footer text
</div>
</body>
</html>
我想在页面上画一条黑色的水平粗线。就像这个stackoverflow页面中的一个一样。 –
我已经添加了一个body {margin:0;}来删除块周围的空白区域。 – dav1dsm1th
'边框底部:20px的固体#000'?有没有这样的事情在网页开发 –