0

我想在(下方)页脚之后的 aspx 页面底部放置半英寸的黑色。

我试过了

css

#footerCol
{
    color: #999;
    padding: 10px 0;
    text-align: center;
    line-height: normal;
    margin: 0;
    font-size: .9em;
}

html:

<div id="footerCol"> </div>
4

2 回答 2

1

当您说“之后”时,我以为您的意思是“之后”:-

<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>
于 2013-10-25T22:56:42.253 回答
1

你需要使用border-top

#footerCol{
    color: #999;
    padding: 10px 0;
    text-align: center;
    line-height: normal;
    border-top: 5px solid #000;
    margin: 0;
    font-size: .9em;
}

http://jsfiddle.net/V6UEL/

于 2013-10-25T22:47:03.683 回答