div绝对靠左,右,上,下
发布时间:2016:06:03 19:16:42 | 已阅: | 来源:智唯网络
扫一扫
手机访问
导语
使元素固定在浏览器的顶部:.box{position:fixed; top:0px; left:0px;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop));}使元素固定在浏览器的底部:.box{position:fixed; bottom:0px;使元素固定在浏览器的顶部:.box{position:fixed; top:0px; left:0px;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop));}使元素固定在浏览器的底部:.box{position:fixed; bottom:0px; left:0px;_position:absolute;_bottom:auto; _TOP: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight);/*兼容IE6*/}使元素固定在浏览器的左侧:.box{position:fixed; top:300px; left:0px;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop+300));}使元素固定在浏览器的右侧:.box{position:fixed; top:300px; right:0px;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop+300));} |

专业建站 免费排名(有什么疑问的请留言或咨询在线客服)
- 全部评论(0)
还没有评论,快来抢沙发吧!