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;}
4
2
.banner::after { /* opacity: .7; */ mix-blend-mode: color; mix-blend-mode: hue; mix-blend-mode: hard-light;}
Thank you!
2
0
3.88
8
.banner::before { transform: skew(-15deg) translateX(-50%);}
Thank you!
8
0
4
3
.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);}
Thank you!
3
0
4
5
<section class="banner"> <h1>Hello World</h1></section>
Thank you!
5
0
4.11
9
.banner::after { opacity: .7; @supports (mix-blend-mode: hue) { opacity: 1; mix-blend-mode: color; mix-blend-mode: hard-light; mix-blend-mode: hue; }}
Thank you!
9
0
4
1
.banner::after, .banner::before { ...}
Thank you!
1
0
4.2
10
.banner::after { ... z-index: 1;}.banner > * { z-index: 100;}
Thank you!
10
0
Are there any code examples left?
New code examples in category TypeScript
-
TypeScript 2022-03-27 19:30:45 typescript promise
-
TypeScript 2022-03-27 17:25:44 how to search for imports in vscode
-
TypeScript 2022-03-27 17:15:20 angular formgroup mark as touched
-
TypeScript 2022-03-27 17:05:06 use of slice and splice add elements array
-
TypeScript 2022-03-27 16:50:23 android studio loop through all objects in layout
-
TypeScript 2022-03-27 14:35:08 wergensherts meaning
-
TypeScript 2022-03-27 13:50:15 remove all the elements from a numpy array python
-
TypeScript 2022-03-27 12:35:49 redux toolkit typescript install
-
TypeScript 2022-03-27 12:35:30 laravel middleware for apis