好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

通过css/js来固定div的位置_html/css_WEB-ITnose

一:先来看看用css的,需要在css里面写表达式,但是一闪一闪的。赋值变量"ignoreMe",并且"document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop"(这是ie的一个bug)。

 1   2   3   4   css test   5   6 #LoadingStatus{ 7 position:fixed !important; 8 position:absolute; 9 top:100px;10 top: expression( ( 100 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );11 margin:0 0 0 -110px;12 width:220px;height:19px;13 left:50%;14 text-align:center;15 border:1px solid red;16 }17  18  19  20   

查看更多关于通过css/js来固定div的位置_html/css_WEB-ITnose的详细内容...

  阅读:39次