我正在测试我的移动应用程序,Windows mobile.I页脚部分有一些问题。问题是关于页脚修复。当我滚动内容时,页脚也会起来。但是页脚在所有浏览器中都是固定的,包括IE和除Windows版以外的所有移动设备。页脚未修复
看到代码,用于IE我给了,
* html #footer {
position:absolute;
top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
}
编辑:
html, body {height: 100%;}
#wrapper {min-height: 100%;}
#footer {
position:fixed; z-index:999;
width:100%;
bottom:-20px;
margin-top: -72px; /* negative value of footer height */
margin-top: 0px !ie; /* for IE */
height: 92px;
clear:both; text-align:center;
background:url(../../) repeat-x #115c9c;
}
手机IE甚至支持表情吗?我会建议避免他们。尝试一个JavaScript解决方案呢? –
不要使用CSS黑客,负边距等。这些东西使一切变得更糟,而不是更好。尝试设计尽可能简单和简单的布局和CSS规则。尝试发现哪些设备不支持哪些CSS规则。 –
@Bli_n:我不太明白你的问题。对于'position:absolute'属性; “它应该相对于其第一个定位的祖先元素进行定位”。 – xan