css代码不显示在服务器上

时间:2012-03-07 10:24:34

标签: asp.net css visual-studio-2010

我有一个加载img,我想在屏幕中间显示但它只是出现在剩下的东西上。这是我使用的css代码

#overlay {
position: fixed;
z-index: 99;
top: 0px;
left: 0px;
background-color: #f8f8f8;
width: 100%;
height: 100%;
filter: Alpha(Opacity=90);
opacity: 0.9;
-moz-opacity: 0.9;
}            
#theprogress {
background-color: #fff;
border:1px solid #ccc;
padding:10px;
width: 300px;
height: 30px;
line-height:30px;
text-align: center;
filter: Alpha(Opacity=100);
opacity: 1;
-moz-opacity: 1;
}
#modalprogress {
position: absolute;
top: 40%;
left: 50%;
margin: -11px 0 0 -150px;
color: #990000;
font-weight:bold;
font-size:14px;
}

它适用于Visual Studio 2010,但不是当我把它放在服务器上时

1 个答案:

答案 0 :(得分:1)

我希望我理解你,如果我这样做,我会提供以下答案:

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
        ....
</head>

最近我遇到了一些问题,一切都在我的机器上正常运行但是当我在服务器上部署时,即使在相同版本的浏览器中运行它,我也得到了不同的HTML。

所以我将这个元标记放在HTML的head部分,一切运行正常。

你也可以试试:

<meta http-equiv="X-UA-Compatible" content="IE=9" />

<meta http-equiv="X-UA-Compatible" content="IE=8" />

希望它有所帮助,