-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathadvanceSelectors.css
More file actions
32 lines (27 loc) · 685 Bytes
/
advanceSelectors.css
File metadata and controls
32 lines (27 loc) · 685 Bytes
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
/*This is universal selector that means that it selects everything is the specified segment '*' */
*,*::before,*::after{
box-sizing: border-box;
margin-top: 0;
}
/*Direct children selector '>' */
.direct-children > p{
color: orange;
}
/*Adjacent siblings '+' */
.adjacent-sibling p + p{
color: blue;
}
/*General sibling '~' */
.general-sibling p ~ p{
color: pink;
}
/*Attribute selector '[]'*/
/*This will select the target attribute from the anchor tag. This can be used when you need to specifically design a segment without giving it a special class*/
a[target]{
color: aquamarine;
text-decoration: none;
}
/*Normal css*/
h1{
color:aquamarine;
}