| 1234567891011121314151617181920212223242526272829303132 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- body {
- margin: 0;
- }
- #box {
- max-width: 400px;
- margin: 100 auto;
- overflow: hidden;
- }
- #box1 {
- padding-top: 56.25%;
- background: url("../html+css/images/img01.gif");
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
- }
- </style>
- </head>
- <body>
- <!-- 实现一个固定宽 响应式盒子 -->
- <div id="box">
- <div id="box1"></div>
- </div>
- </body>
- </html>
|