| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!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>
- .box {
- /* width: 600px; */
- max-width: 600px;
- margin: 100px auto;
- }
- .box img {
- width: 100%;
- }
- .box2 {
- max-width: 600px;
- margin: 0 auto;
- }
- .box3 {
- background-image: url(./img/img1.jpg);
- background-size: cover;
- width: 100%;
- padding-top:62.5%;
- }
- </style>
- </head>
- <body>
- <div class="box">
- <img src="./img/img1.jpg" alt="">
- </div>
- <div class="box2">
- <div class="box3"></div>
- </div>
- </body>
- </html>
|