Created
April 16, 2019 19:08
-
-
Save valterbarros/9e6ff0793a8162d7a8dee73d4f227f0a to your computer and use it in GitHub Desktop.
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
// HTML | |
<div class="inspection-imagecontainer"> | |
<img src="http://oneimage.com"/> | |
</div> | |
// CSS | |
.inspection-imagecontainer{ | |
display: inline-block; | |
width: 33%; | |
vertical-align: middle; | |
height: 200px; | |
position: relative; | |
background: rgba(0, 0, 0, 0.04); | |
margin-bottom: 3px; | |
> .image { | |
max-height: 100%; | |
max-width: 100%; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
-webkit-transform: translate(-50%, -50%); | |
transform: translate(-50%, -50%); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment