Enzo
0
Q:

how to css after elements for background overlays

.banner::after {    content: ""; // ::before and ::after both require content    position: absolute;    top: 0;    left: 0;    width: 100%;    height: 100%;    background-image: linear-gradient(120deg, #eaee44, #33d0ff);    opacity: .7;}
0
.banner::after {    opacity: .7;    @supports (mix-blend-mode: hue) {        opacity: 1;        mix-blend-mode: color;        mix-blend-mode: hard-light;        mix-blend-mode: hue;    }}
0
.banner::after {    /* opacity: .7; */    mix-blend-mode: color;    mix-blend-mode: hue;    mix-blend-mode: hard-light;}
0
.banner::after {    ...    z-index: 1;}.banner > * {    z-index: 100;}
0
.banner::before {    transform: skew(-15deg)                translateX(-50%);}
0
.banner::after, .banner::before {    ...}
0
<section class="banner">    <h1>Hello World</h1></section>
0
.banner {    overflow: hidden;}.banner::after {    content: "";  // :before and :after both require content    position: absolute;    width: 75%; // Makes the overlay smaller to accommodate the skew    height: 100%;    top: 0;    left: 50%; // Push the element 50% of the container's width to the right    transform: skew(15deg) // Puts the element on an angle               translateX(-50%); // Moves the element 50% of its width back to the left    background-image: linear-gradient(120deg,#eaee44,#33d0ff);}
0

New to Communities?

Join the community