Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .image-container {
- position: relative;
- overflow: hidden;
- width: 10rem; // can differ
- height: 10rem; // can differ
- }
- .image {
- position: absolute;
- top: 50%;
- left: 50%;
- min-height: 100%;
- min-width: 100%;
- height: auto;
- width: auto;
- max-width: none;
- max-height: none;
- transform: translate3d(-50%, -50%, 0);
- }
Add Comment
Please, Sign In to add comment