完全用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;
相关文档:
使用IE8 可能出现的问题:
* 网页布局不整齐
* 文本或图像重叠
* JavaScript 功能有问题或错误
一般解决
1.写CSS Hack。
而后台人员不擅长于写CSS。
2.强制IE8像IE7那样呈现内容。
在<head></ ......
magento个别页面添加css和js文件,可以将其放在个别页面的xml中,或者放在CMS的layout update中,其代码和文件存放位置如下
<reference name="head">
<action method="addCss"><stylesheet>css/mystyles.css</stylesheet></action>
//添加css mystyles.css 文件在 /skin/frontend/主题包 ......
/* mozilla.org Base Styles
* maintained by fantasai
* (classes defined in the Markup Guide - http://mozilla.org/contribute/writing/markup)
*/
/* Suggested order:
//显示属性
* display
* list-style
* position
* float
* clear
//自身属性
* width
* height
* margin
* padding
* border
* ba ......
作为一个资深并且专业的扒皮人员,在我从初三开始投入伟大的互联网中到现在积累了丰富的扒皮经验。我相信每个做web的程序员也都会有类似的经历。
在扒皮过程中,必不可少的需要下载样式文件中的图片。碰到比较庞大的样式文件,其中可能会有上百个需要下载的图片,那么使用下面这段小代码是最为合
适的了。
< ?php
/* ......
/*不管是什么方法,书写的顺序都是firefox的写在前面,IE7的写在中间,IE6的写在后面。*/
.JS_CenterAD_marquee_Right
{
margin-left:17px !important; /firefox*/
*margin-left:17px !important; / ......