您好,欢迎访问一九零五行业门户网

html css 控制div或者table等固定在指定位置_html/css_WEB-ITnose

.bottomtable{
 background-color: rgb(249,249,249);
    z-index:99999999; position:fixed; bottom:0; left:0; width:100%; _position:absolute; /* for ie6 */
    /* _top: expression(document.body.scrolltop+document.body.clientheight-this.offsetheight);    */
    _top: expression(document.body.scrolltop+document.body.clientheight-this.offsetheight-6); /* for ie6 */
     overflow:visible;
 }
1、z-index:设置层处于最顶层。
2、position:fixed;设置定位。
3、_top: expression(document.body.scrolltop+document.body.clientheight-this.offsetheight-6);通过css绑定js控制层距顶端的高度,
此处是控制层处于底部,具体数值根据需求作相应的调整。
4、document.body.scrolltop:body,body标签滚动条滚动的距离,可更换为你其它标签对象(存在滚动条)。
5、document.body.clientheight,body标签的高度,可更换为你其它标签对象。
6、-6,距具体情况作相应改动。
其它类似信息

推荐信息