.box
View Compiled
.box {
background-color: gray;
width: 50%;
margin: 0 auto;
height: auto;
position: relative;
&::before {
content: '';
display: block;
padding-top: 50%;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.