手机
当前位置:查字典教程网 >网页设计 >XHTML >html css 控制div或者table等固定在指定位置的实现方法
html css 控制div或者table等固定在指定位置的实现方法
摘要:CSSCode复制内容到剪贴板.bottomTable{background-color:rgb(249,249,249);z-index:...

CSS Code复制内容到剪贴板 .bottomTable{ background-color:rgb(249,249,249); z-index:99999999;position:fixed;bottombottom:0;left:0;width:100%;_position:absolute;/*forIE6*/ /*_top:expression(document.body.scrollTop+document.body.clientHeight-this.offsetHeight);*/ _top:expression(document.body.scrollTop+document.body.clientHeight-this.offsetHeight-6);/*forIE6*/ 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,距具体情况作相应改动。

以上这篇html css 控制div或者table等固定在指定位置的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持查字典教程网。

原文地址:http://www.cnblogs.com/skycsdn/archive/2016/06/13/5580009.html

【html css 控制div或者table等固定在指定位置的实现方法】相关文章:

html表单属性readonly和disabled的使用方法

移动端网页大小自适应的实现方法

xhtml css网页制作问题的解决方法

html 表格比较宽溢出的解决方法

html用title属性实现鼠标悬停显示文字

将html文本中所有的标签替换掉的方法

iframe如何刷新的三种实现方案

html text的常用事件和方法详细描述

html 鼠标 css 控制

input checkbox 扩大点击范围的实现方法

精品推荐
分类导航