div位置固定在firefox,chrome中均可一行搞定:
position:fixed;
但是IE6竟然不支持,所以没办法,费了一番功夫终于搞定了。
css中,首先:
body{
background-image:url(about:blank);
background-attachment:fixed; /*这两行很重要,可以防抖动*/
}
然后,
.notefilter{
position:fixed !important;
position: absolute;
*bottom: auto;
*clear: both;
*top:expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop
: document.body.scrollTop );
width:950px;
z-index:2008;
background:#EEF9EB;
}
notefilter是要固定在页面顶端的div类名。