Naa*_*aaN 3 css internet-explorer windows-phone-7
我正在使用Windows mobile测试我的移动应用程序.我在页脚部分遇到了一些问题.问题在于页脚修复问题.当我滚动内容时,页脚也会起来.但页脚固定在所有浏览器中,包括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');
}
Run Code Online (Sandbox Code Playgroud)
编辑:
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;
}
Run Code Online (Sandbox Code Playgroud)
Windows Phone 7 - Mango之前和之后都忽略固定定位并将固定元素渲染为position:static.您测试的IE9桌面和其他浏览器支持position:fixed. http://bradfrostweb.com/blog/mobile/fixed-position/
似乎不再支持表达式 http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx
所以我建议首先删除'position:fixed'并使其在IE9桌面上工作,因为在WP7中没有简单的方法来调试html.你似乎还需要继续使用额外的js来获得WP7中的固定页脚.