-
Notifications
You must be signed in to change notification settings - Fork 0
/
pseudo classes.html
65 lines (55 loc) · 1.36 KB
/
pseudo classes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<title>My First website</title>
<link rel="stylesheet" href="style.css">
<style>
a:link {
color: lawngreen;
}
a:visited {
color: gray;
}
a:hover {
color: tomato;
}
a:active {
color: yellow;
}
button:hover {
background-color: lightgray;
}
/* li:nth-child(1){
background-color: yellow;
} */
/* li:nth-child(even){
background-color: skyblue;
}
li:nth-child(odd){
background-color: powderblue;
} */
li:nth-child(5n+1) {
background-color: yellow;
}
</style>
</head>
<body>
<!-- pseudo class - a keyword added to a
selector that specifies a special state
of the selected element(s) -->
<a href="https://www.google.com"> Google.com</a>
<button>Click Me</button>
<ul>
<li>This is element #1</li>
<li>This is element #2</li>
<li>This is element #3</li>
<li>This is element #4</li>
<li>This is element #5</li>
<li>This is element #6</li>
<li>This is element #7</li>
<li>This is element #8</li>
<li>This is element #9</li>
<li>This is element #10</li>
</ul>
</body>
</html>