.box.box--100vw
.box__text
p #[b F]ull width
.box.box--100p
.box__text
p Centered #[b C]olumn
.box.box--divide.box--divide-left
.box__text
p #[b L]eft #[b O]ffset
.box.box--divide.box--divide-right
.box__text
p #[b R]ight #[b O]ffset
.legend
.legend__row
p LO = (F - C) / -2
p RO = (F - C) / -2
.legend__row
p LO - Left Offset
p RO - Right Offset
p F - Full-width (100wv)
p C - Content (100%)
View Compiled
:root {
--width-100vw: 100vw;
--width-100p: 60vw;
}
body {
min-height: 100vh;
padding: 0;
margin: 0;
position: relative;
}
.box {
will-change: true;
position: absolute;
top: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-left: auto;
margin-right: auto;
opacity: 0;
animation-fill-mode: forwards;
animation-duration: 9s;
animation-iteration-count: infinite;
}
.box--100vw {
background-color: #4158D0;
backdrop-filter: rotate-hue(10%);
width: var(--width-100vw);
left: 50%;
transform: translateX(-50%);
animation-name: revealvw;
}
.box--100p {
background-color: #C850C0;
backdrop-filter: rotate-hue(20%);
width: var(--width-100p);
left: 50%;
transform: translateX(-50%);
animation-name: revealp;
}
.box--divide {
background-color: #FFCC70;
backdrop-filter: rotate-hue(30%);
width: calc((var(--width-100vw) - var(--width-100p)) / 2);
}
.box--divide-left {
left: 0;
animation-name: reveall;
}
.box--divide-right {
right: 0;
animation-name: revealr;
}
.box__text {
text-align: center;
@media screen and (max-width: 600px) {
writing-mode: vertical-rl;
transform: rotate(180deg);
}
}
p {
margin: 0;
line-height: 2;
}
.legend {
background-color: #FFFB7D;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.legend__row {
display: flex;
flex-wrap: wrap;
justify-content: center;
p {
padding-left: .5em;
padding-right: .5em;
}
}
@keyframes revealvw {
0% {
opacity: 0;
}
5%,
100% {
opacity: 1;
}
}
@keyframes revealp {
0%,
20% {
opacity: 0;
}
25%,
100% {
opacity: 1;
}
}
@keyframes reveall {
0%,
40% {
opacity: 0;
}
45%,
100% {
opacity: 1;
}
}
@keyframes revealr {
0%,
60% {
opacity: 0;
}
65%,
100% {
opacity: 1;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.