代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> *{ padding: 0; margin: 0; } .box{ display: flex; width: 1000px; height: 800px; background-color: orange; text-align: center; line-height: 100px; color: #fff; font-size: 30px; font-weight: 700; } .box div{ border: 2px solid #fff; background-color: green; } .box div:first-child, .box div:last-child{ width: 200px; height: 200px; } .lisi{ height: 200px; flex: 1; } </style> </head> <body> <div class="box"> <div>张三</div> <div class="lisi">李四</div> <div>王五</div> </div> </body> </html>
效果图:
移动web-伸缩比
最新推荐文章于 2024-06-15 11:46:27 发布