File tree Expand file tree Collapse file tree 2 files changed +23
-25
lines changed Expand file tree Collapse file tree 2 files changed +23
-25
lines changed Original file line number Diff line number Diff line change 11
11
</ head >
12
12
13
13
< body >
14
- < a href ="# "> general link</ a >
15
- < a href ="https://www.css3.com/ "> visited link</ a >
16
- < a href ="# "> hover link</ a >
17
- < a href ="# "> active link</ a >
18
- < a > simple link</ a >
14
+ < h1 class ="absolute "> I'm absolute</ h1 >
15
+ < h1 class ="relative "> I'm relative</ h1 >
16
+ < p class ="absolute ">
17
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus
18
+ sapiente porro nostrum incidunt molestias quia distinctio repellat ipsa.
19
+ Quo, mollitia?
20
+ </ p >
21
+ < p class ="relative ">
22
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore
23
+ temporibus iusto nesciunt unde laudantium nostrum, illo saepe pariatur
24
+ facere optio?
25
+ </ p >
19
26
</ body >
20
27
</ html >
Original file line number Diff line number Diff line change 1
1
/*
2
- :link - unvisited links with href
3
- :visited - visited links
4
- :hover - hover
5
- :active - as the user click's
6
- a - all links
2
+ :root root element of the document, higher specificity
3
+ html element
4
+ general styles
5
+ css variables
7
6
*/
8
- a {
9
- display : block;
10
- background : yellow;
11
- margin-bottom : 0.5rem ;
12
- padding : 0.5rem ;
13
- }
14
7
15
- a : link {
16
- color : aqua ;
8
+ : root {
9
+ font-size : 10 px ;
17
10
}
18
11
19
- a : visited {
12
+ .absolute {
13
+ font-size : 24px ;
20
14
color : red;
21
15
}
22
16
23
- a : hover {
24
- color : green;
25
- }
26
-
27
- a : active {
28
- color : fuchsia;
17
+ .relative {
18
+ color : blue;
19
+ font-size : 1.5rem ;
29
20
}
You can’t perform that action at this time.
0 commit comments