File tree Expand file tree Collapse file tree 2 files changed +20
-40
lines changed Expand file tree Collapse file tree 2 files changed +20
-40
lines changed Original file line number Diff line number Diff line change 11
11
</ head >
12
12
13
13
< body >
14
- < div class ="banner ">
15
- < img src ="./small.jpeg " alt ="small retro " class ="first-image " />
16
- < img src ="./big.jpeg " alt ="big retro " class ="second-image " />
17
- < img
18
- src ="./images/folder-img.jpeg "
19
- alt ="folder retro "
20
- class ="third-image "
21
- />
22
- </ div >
14
+ < p > I'm extremely simple</ p >
23
15
</ body >
24
16
</ html >
Original file line number Diff line number Diff line change 1
1
/*
2
- z-index --- z-axis
3
- 0 - default
4
- does not work on position:static;
2
+ ::before ::after pseudo-elements creates element and inserts before and after CONTENT
3
+ content:'' - required
4
+ img --- does not work
5
5
*/
6
6
7
- img {
8
- width : 250px ;
9
- height : 250px ;
10
- position : absolute;
7
+ p ::before {
8
+ content : "hello world" ;
9
+ font-size : 2rem ;
10
+ color : blue;
11
+ font-weight : 700 ;
12
+ display : block;
13
+ background : yellow;
11
14
}
12
15
13
- .banner {
14
- position : relative;
15
- border : 5px solid red;
16
- width : 80vw ;
17
- height : 75vh ;
18
- margin : 50px auto;
19
- }
20
-
21
- .first-image {
22
- top : 0 ;
23
- left : 0 ;
24
- z-index : 3 ;
25
- }
26
-
27
- .second-image {
28
- top : 10% ;
29
- left : 10% ;
30
- z-index : 2 ;
31
- }
32
-
33
- .third-image {
34
- top : 20% ;
35
- left : 20% ;
36
- z-index : -1 ;
16
+ p ::after {
17
+ content : "" ;
18
+ font-size : 1rem ;
19
+ color : red;
20
+ font-weight : 700 ;
21
+ background : greenyellow;
22
+ display : block;
23
+ width : 100% ;
24
+ height : 3rem ;
37
25
}
You can’t perform that action at this time.
0 commit comments