.post butto:hover {
background-color: #e63945;
color: #f1faee;
}
post class의 자식인 button에 마우스를 올리면 ( hover ) background color와 color 가 변한다.
.post button:active {
background-color: aqua;
}
post class의 자식인 button에 마우스를 클릭하면( active ) background color 가 변한다.
.post:nth-of-type(2n) {
background-color: #dfe8dc;
}
post class의 2번째 마다 background color가 변한다.
만약 2n이 아닌 3n이면 3번째마다 그냥 2이면 2번째 post만
'The Web Developer 부트캠프 2022' 카테고리의 다른 글
Relative Css unites (0) | 2022.09.11 |
---|---|
Padding margin display (0) | 2022.09.11 |
CSS 기본 (0) | 2022.09.10 |
input과 textarea, min(max)length, required (0) | 2022.09.09 |
table form label button (0) | 2022.09.09 |