Last active
January 9, 2019 16:29
-
-
Save eroSilva/d229d123b4a43b9a3128fbd95eecba62 to your computer and use it in GitHub Desktop.
Estilos para criar Blocos de HTML que mantem a proporção no seu redimensionamento.
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
| // Responsive content | |
| // - ... | |
| %responsive-content{ | |
| position: relative; | |
| display: block; | |
| height: 0; | |
| overflow: hidden; | |
| > img, | |
| > video, | |
| > iframe, | |
| > canvas{ | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| bottom: 0; | |
| width: 100%; | |
| border: 0; | |
| transform: translateX(-50%) translateY(-50%); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment