1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| <!DOCTYPE html> <html lang="zh-CN">
<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> .container { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; width: 600px; height: 600px; border: 1px dashed #000; border-radius: 12px; padding: 12px; margin: 20px auto; background: white; }
.box { border: 1px solid #666; border-radius: 4px; background: transparent;
display: flex; justify-content: center; align-items: center; font-size: 22px; }
.tall-vertical { grid-row: 1 / 3; background-color: #FFCDD2; }
.wide-horizontal { grid-column: 2 / 4; background-color: #C8E6C9; }
.square { grid-row: 2; grid-column: 2; background-color: #BBDEFB; }
.bottom-wide { grid-row: 3; grid-column: 1 / 3; background-color: #FFF9C4; }
.tall-right { grid-row: 2 / 4; grid-column: 3; background-color: #D1C4E9; } </style> </head>
<body> <div class="container"> <div class="box tall-vertical">1</div> <div class="box wide-horizontal">2</div> <div class="box square">3</div> <div class="box bottom-wide">4</div> <div class="box tall-right">5</div> </div> </body>
</html>
|