position: fixed;兼容ie6方法
#menu{ position: fixed; top: 100px; left: 50%; margin-left: 400px; width: 50px;}
以上 position: fixed;在ie6不兼容,虽然现在基本不用兼容ie6了,我还是要说一下,方法如下:
* html, * html body{ background-image: url(about:blank); background-attachment: fixed;} * html #menu{ position: absolute; bottom: auto; top: expression(100+((e=document.documentElement.scrollTop)?e: document.body.scrollTop)+'px');}
本文作者: Jasmine
本文链接: https://www.jianbaizhan.com/article/528
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!