2009-11-13 164 views
1

如果turn off JavaScript的计算器上,你会看到noscript-warning顶部CSS - 位置固定,底部

#noscript-warning { 
font-family:Arial,Helvetica,sans-serif; 
position:fixed; 
top:0; 
left:0; 
width:100%; 
z-index:101; 
text-align:center; 
font-weight:bold; 
font-size:120%; 
color:#fff; 
background-color:#AE0000; 
padding: 5px 0 5px 0; 
} 

问题。如何将警报定位在浏览器底部?

回答

2

忘记了浏览器的支持,变革:

top:0; 

bottom:0; 
0

html 
{ 
    height: 100%; 
} 

在你的CSS。

3

请参阅Fixing position:fixed for Internet Explorer了解有关IE兼容性的提示,无论是顶部还是底部定位。特别是,当底部定位块与内容一起滚动时,它会变得很难看,而不是像预期的那样保持固定。

0

bottom:0;应该这样做。

只要删除top:0;