Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Заголовок документа</title> <style> .grid-container { display: grid; grid-template-columns: auto auto auto auto; grid-gap: 10px; background-color: #ccc; padding: 10px; } .grid-container > div { background-color: #888; text-align: center; padding: 20px 0; font-size: 30px; } .box1 { grid-column: 1 / 3; } </style> </head> <body> <h2>Пример свойства grid-column</h2> <div class="grid-container"> <div class="box1">1</div> <div class="box2">2</div> <div class="box3">3</div> <div class="box4">4</div> <div class="box5">5</div> <div class="box6">6</div> <div class="box7">7</div> </div> </body> </html>