-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path15.pseudo-clases.css
More file actions
82 lines (67 loc) · 1.08 KB
/
15.pseudo-clases.css
File metadata and controls
82 lines (67 loc) · 1.08 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* Pseudo clases */
body {
padding: 1rem;
background-color: beige;
}
/* unvisited link */
a:link {
color: black;
}
/* visited link */
a:visited {
color: gray;
text-decoration: line-through;
}
/* mouse over link */
a:hover {
font-weight: bold;
text-decoration: none;
margin-bottom: 1px;
font-size: 1.1rem;
background-color: rgb(74, 74, 74);
padding: 5px 10px;
border-radius: 5px;
}
/* selected link */
a:active {
color: rgb(192, 187, 187);
}
div {
background-color: lightgrey;
padding: 1rem;
}
div p {
visibility: hidden;
}
div:hover p {
visibility: visible;
}
/* Elementos li: */
li:first-child {
color: red;
}
li:last-child {
color: blue;
}
/* CSS empieza a contar en 1: */
li:nth-child(2) {
color: green;
}
/* clase "li" */
.li:first-of-type {
color: purple;
}
.li:last-of-type {
color: orange;
}
.li:nth-last-of-type(2) {
color: pink;
}
/* Ejemplo con pseudo-clase "not" */
.li-2:not(:first-of-type) {
color: brown;
}
q:lang(no) {
quotes: "''" "''";
}
/* Más sobre pseudo-clases: https://www.w3schools.com/css/css_pseudo_classes.asp */