123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <!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: 100px;
- height: 100px;
- background-color:red;
- }
- .box2{
- background-color: blue;
- padding-bottom: 100px;
- width: 100px;
- }
- .box3{
- width: 100px;
- background-color: yellow;
- }
- .box3::after{
- content: "";
- display: block;
- padding-bottom: 100%;
- }
- .box4{
- width: 100px;
- background-color: green;
-
- }
- .box4::after{
- content: "";
- display: block;
- padding-bottom: 100%;
- }
- </style>
- </head>
- <body>
- <div class="box"></div>
- <div class="box2"></div>
- <div class="box3"></div>
- <div class="box4"></div>
- </body>
- </html>
|