everylayout/frame.css

30 lines
410 B
CSS
Raw Normal View History

2021-03-28 21:39:22 -04:00
/*===========*/
/* The Frame */
/*===========*/
.frame {
--n: 9;
--d: 16;
padding-bottom: calc(var(--n) / var(--d) * 100%);
position: relative;
}
.frame > * {
overflow: hidden;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
}
.frame > img,
.frame > video {
width: 100%
height: 100%
object-fit: cover;
}