Last active
August 25, 2016 14:46
-
-
Save antfu/9b4cecef839949537edfca992690ce55 to your computer and use it in GitHub Desktop.
[CSS] Make height same as width
This file contains 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
.element:before{ | |
content: ""; | |
display: block; | |
padding-top: 100%; /* Make height same as width */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment