完全用CSS实现100%高度覆盖层(IE7测试通过)
这篇文章是在如下地址看到的:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_23302976.html
首先是HTML部分:
<
body>
<
div id="loading">
<div><img src="../images/loading.gif" /><span>Please Wait</span></div>
</div>
</
body>
然后CSS是部分,做了些修改:
body,
html
{
margin:0
;
height:100%
;
min-height:100%
;
}
#loading
{
background:#ccc
;
position:absolute
;
top: 0
;
left: 0
;
min-height:100%
;
height:auto !important
;
height:100%
;
width:100%
;
filter:alpha(opacity=50)
;
opacity:0.5
;
-moz-opacity: .50
;
这里最总要的是:height:auto !important;
相关文档:
1、不要使用过小的图片做背景平铺。这就是为何很多人都不用 1px 的原因,这才知晓。宽高 1px 的图片平铺出一个宽高 200px 的区域,需要 200*200=40, 000 次,占用资源。
2、无边框。推荐的写法是 border:none;,哈哈,我一直在用这个。 border:0; 只是定义边框宽度为零,但边框样式、颜色还是会被浏览器解析,占用资 ......
CSS语法 (不区分大小写) JavaScript语法 (区分大小写)
border border
border-bottom &nbs ......
http://www.qiqiboy.com/2009/11/26/css-image-orientation-and-all-images-in-a-picture.html
如今做网页为了使网站丰富多彩,富于表现力,往往需要应用大量的图片/图标。如何处理这些图片,使其尽量不影响网页载入,解析等速度,是一个不大不小的问题。如果你的网站用各种图标图案装饰的靓丽无 ......
/*不管是什么方法,书写的顺序都是firefox的写在前面,IE7的写在中间,IE6的写在后面。*/
.JS_CenterAD_marquee_Right
{
margin-left:17px !important; /firefox*/
*margin-left:17px !important; / ......
在制作一个浮动图片用于网站显示时,出现图片固定不浮动,最终检查发现 DIV浮动与
http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd冲突
去掉这段可暂时实现浮动。
但此代码不可随意去掉,去掉后又会导致DIV某些属性混乱。幸好此次暂时不使用某些功能
临时解决办法,期待更好的解决办法 ......