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