如何将两种CSS应用于一个控件,一种用于Internet Explorer,另一种用于Firefox和Chrome
只是在 Internet Explorer 中,contentplaceholder 今天移动到另一个地方,过去几天没问题
<div id="content" style="margin-top:28px; margin-left: 240px; border:0px solid;">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<!--[if IE]>
#hellocss
{
margin-top:-600px; margin-left: 100px; border:0px solid;
}
<![endif]-->
<!--[if !IE]>
#hellocss
{
margin-top:28px; margin-left: 240px; border:0px solid;
}
<![endif]-->
我遇到了一个大问题,在 Internet Explorer 中 margin-top 可以是负数
您可以使用 Conditional Comments像这样在 CSS 中
<!--[if IE]>
<link href="Styles/IEstylesheet.css" rel="stylesheet" type="text/css" />
<![endif]-->
我是一名优秀的程序员,十分优秀!