我想在(下方)页脚之后的 aspx 页面底部放置半英寸的黑色。
我试过了
css
#footerCol
{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
margin: 0;
font-size: .9em;
}
html:
<div id="footerCol"> </div>
当您说“之后”时,我以为您的意思是“之后”:-
<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>
你需要使用border-top
#footerCol{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
border-top: 5px solid #000;
margin: 0;
font-size: .9em;
}