IE 6 中的固定定位

Avatar of Chris Coyier
Chris Coyier
* { margin:0; padding:0; }
html, body {
   height: 100%;
}
body #fixedElement {
   position:fixed !important;
   position: absolute; /*ie6 and above*/
   top: 0;
   right: 0;
}
#page-wrap {
    width: 600px;
    margin: 0 auto; 
    font: 16px/2 Georgia, Serif;
}

如果要沿浏览器窗口底部边缘进行固定定位,则需要在 body 和 html 元素上设置 100% 的高度。