我有一个非主页,看起来像这样
为什么没有一些CSS属性出现在我的母版页中?
现在我有一个母版页和内容占位里面我有一个div标签,在我写的具体内容上的按钮页时,标签上的按钮看起来像这样
现在,他们具有相同的CSS属性,但他们不会在母版页一个显示出来,这里是div标签的代码和按钮
.container-div
{
position:absolute;
padding-top:8%;
padding-left:10%;
padding-right:10%;
max-height:80%;
z-index:0;
font-family:Calibri;
}
#buttons {
position:absolute;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
border: 1px solid transparent;
border-radius: 4px;
cursor:pointer;
z-index:20;
}
#buttons:hover {
background-color:cadetblue;
}
,这是HTML代码
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="placeHolderDiv" class="container-div" runat="server">
<asp:Button id="buttons" runat="server" Text="Cancel" CssClass="buttons" OnClick="cancel"/>
</div>
“这是html代码” - 不,它不是。这是ASP.NET代码。 HTML是发送到浏览器的内容。查看浏览器*中的源代码*。 – Quentin