用CSS实现的绝对定位
2009年12月20日
| 标签:
- <html>
- <title>用CSS实现的绝对定位</title>
- <style type="text/css">
- *{ margin:0; padding:0;}
- html{_overflow:hidden;}
- body{_height:100%; _overflow-y:auto;}
- #box{
- width:100px;
- height:100px;
- background-color:#999999;
- position:fixed;
- _position:absolute;
- top:100px;
- left:100px;
- }
- </style>
- <body>
- < ?php
- for($i=0;$i<100;$i++) {
- echo "<p>内容\n";
- }
- ?>
- <div id="box"></div>
- </body>
- </html>
发表评论
| Trackback
