Created
May 23, 2020 13:51
-
-
Save steveclarke/bbbd3a15de97de2a26f47578fbb1c69a to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<style> | |
/* https://css-tricks.com/a-grid-of-logos-in-squares/ */ | |
.grid { | |
display: grid; | |
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); | |
grid-gap: 2rem; | |
} | |
.grid > div { | |
background: black url('https://picsum.photos/200'); | |
display: grid; | |
border-radius: 50%; | |
} | |
/* padding hack to set ratio to square */ | |
.grid > div::before { | |
content: ""; | |
padding-bottom: 100%; | |
display: block; | |
} | |
</style> | |
<body> | |
<div class="grid"> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment