- <html>
- <head>
- <title>div固定位置,不随滚动条滚动</title>
- <style
type="text/css">
- html,body {
- overflow:hidden;
- margin:0px;
- width:100%;
- height:100%;
- }
- .virtual_body {
- width:100%;
- height:100%;
- overflow-y:scroll;
- overflow-x:auto;
- }
- .fixed_div {
- position:absolute;
- z-index:2008;
- bottom:20px;
- left:40px;
- width:800px;
- height:40px;
- border:1px solid red;
- background:#e5e5e5;
- }
- </style>
- </head>
- <body>
- <div
class="fixed_div">我永远在这里,哪也不去</div>
- <div
class="virtual_body">
- <div
style="height:888px;">
- <br/><br/><br/><br/><br/><br/><br/><br/><br/>
- 滚动条是把杀猪刀
- </div>
- </div>
- </body>
- </html>
posted on
2013-02-06 17:10
点石互动
阅读(
306)
评论()
编辑
收藏
举报