11 May 2016 07:30
CSS - IMAGE RATIO - Maintain Aspect Ratio Mixin | CSS-Tricks
by 2 others (via)maintaining the assigned aspect ratio as it resizes.
.sixteen-nine {
position: relative;
}
.sixteen-nine:before {
display: block;
content: "";
width: 100%;
padding-top: 56.25%;
}
.sixteen-nine > .content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
1
(1 marks)