style pseudo element 2c style before 2c style after

Solutions on MaxInterview for style pseudo element 2c style before 2c style after by the best coders in the world

showing results for - "style pseudo element 2c style before 2c style after"
Alice
22 Jul 2016
1<style>
2div {
3  width: 100px;
4  height: 100px;
5  position: relative;
6  border: 1px solid black;
7}
8
9div:after {
10  background-color: var(--my-color-var);
11  content: '';
12  position: absolute;
13  top: 0;
14  bottom: 0;
15  right: 0;
16  left: 0;
17}
18</style>
19<div style="--my-color-var: orange;"></div>
Elsa
11 Mar 2020
1a::before {
2  content: "whatever content you want to display";
3  /*css declaration*/
4}
similar questions