为了账号安全,请及时绑定邮箱和手机立即绑定

源代码里最后几行设置样式的代码有什么作用?

        * 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');
        }

上面的代码有什么作用?浏览器兼容?

正在回答

2 回答

 //这一块是解决IE浏览器刷新,会有白页面重复加载显示的
  * 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');
        }


0 回复 有任何疑惑可以回复我~
#1

Groune 提问者

谢谢!搜代码只搜到了兼容IE的代码部分。
2015-05-06 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

源代码里最后几行设置样式的代码有什么作用?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信