- <html>
- <head>
- <title>Title</title>
- <style>
- .bannerbox {
- width:100%;
- position:relative;
- overflow:hidden;
- height:200px;
- }
- .banner {
- width:3000px;
- position:absolute;
- left:50%;
- margin-left:-1500px;
- }
- </style>
- </head>
- <body>
- <div class="bannerbox">
- <div class="banner">
- <img src1="t1.jpg">
- </div>
- </div>
- </body>
- </html>
- //该片段来自于http://www.codesnippet.cn/detail/0211201513939.html
来源: http://www.codesnippet.cn/detail/0211201513939.html