Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- div {
- width: 50px;
- height: 50px;
- position: absolute;
- top: 100px;
- }
- div:first-of-type {
- background-color: blue;
- left: 100px;
- }
- div:nth-of-type(2) {
- background-color: green;
- left: 250px;
- }
- div:nth-of-type(3) {
- background-color: red;
- left: 400px;
- }
- div:last-of-type {
- background-color: purple;
- left: 550px;
- }
- p:nth-child(n +2 ) {
- color: red;
- }
- /*
- first-child
- last-child
- nth-child(3) //////////// в скобках можно писать: n, 4, 3n, n + 2
- nth-last-child(3)
- first-of-type
- last-of-type
- nth-of-type(2)
- nth-last-of-type(2)
- hover
- focus
- not() /////// в скобках можно писать любой селектор
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement