Created
August 28, 2019 21:46
-
-
Save kyrose/424e61f606a0d6eb2aa8d7d0b86ed1bd to your computer and use it in GitHub Desktop.
Contain / Cover images like background
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
.image { | |
background: #34495e; | |
border: 1px solid #34495e; | |
width: 200px; | |
height: 200px; | |
} | |
.image-contain { | |
object-fit: contain; | |
object-position: center; | |
} | |
.image-cover { | |
object-fit: cover; | |
object-position: right top; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment