Created
January 4, 2022 06:54
-
-
Save gmcusaro/0bcc1e0e1c17430b404e5615ca43fe91 to your computer and use it in GitHub Desktop.
Grid gallery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid { | |
display: grid; | |
grid-template-columns: repeat(4,1fr); | |
grid-gap: 8px; | |
grid-auto-flow: dense; | |
} | |
.item1x1 { | |
grid-column: span 1; | |
grid-row: span 1; | |
aspect-ratio: 1/1; | |
background-color: aqua; | |
} | |
.item2x2 { | |
grid-column: span 2; | |
grid-row: span 2; | |
aspect-ratio: 1/1; | |
background-color: aquamarine; | |
} | |
.item3x2 { | |
grid-column: span 3; | |
grid-row: span 2; | |
aspect-ratio: 3/2; | |
background-color: blueviolet; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment