-
버튼 기본 , active 활성화 했을 때 상태CSS 2022. 11. 29. 10:18
a.accordion-btn {
position:relative;
display:block;
&:after {
content:'';
position:absolute;
display:block;
width:24px;
height:24px;
top:50%;
right:20px;
transform: translateY(-50%) rotate(0deg);
-webkit-transition: all 0.5s ease;
transition: all 0.2s ease;
background:url(../../assets/images/arrow-down.svg) no-repeat center;
}
&.active {
&:after {
transform: translateY(-50%) rotate(-180deg);
-webkit-transition: all 0.5s ease;
transition: all 0.2s ease;
}
}
}
'CSS' 카테고리의 다른 글
aside를 포함한 wrapper 작업 시 (0) 2022.11.29 100vh 계산법 (0) 2022.11.29 focus-within (0) 2022.11.28 테이블 각 행에 색을 따로 넣을 때 (2) 2022.11.28 행의 배경색을 번갈아 넣기 (0) 2022.11.28