티스토리 뷰
반응형
(메타 퀘스트프로 사이트에 적용된 링크 효과 구현하기)
<div class="item">
<div class="label">밑줄 효과 CSS</div>
<div class="underline"></div>
</div>
.item {
position: relative;
width: fit-content;
cursor: pointer;
}
.item .label {
position: relative;
padding: 4px 0;
font-weight: 700;
font-size: 14pt;
}
.item .underline {
position: absolute;
transform: scaleX(0);
transform-origin: bottom right;
transition: transform 0.25s ease-out;
border-bottom: solid 1px blue;
width: 100%;
height: 0;
}
.item:hover .underline {
transform-origin: bottom left;
transform: scaleX(1);
}
반응형
'프로그래밍 > CSS' 카테고리의 다른 글
[CSS] text-overflow:ellipsis 를 FireFox 에서 사용하기 (3) | 2008.12.07 |
---|---|
[HTML/CSS] IE6/IE7, 마지막 글자 중복 버그(IE Duplicate Charsters Bug) (1) | 2008.08.13 |
[CSS] FireFox 에서 가운데 정렬하기(text-align:center) 위한 3가지 방법 (8) | 2008.08.06 |
[CSS] 이미지 없이 CSS와 JavaScript를 이용한 라운드 테이블(Round Table) 만들기 (0) | 2008.06.23 |
[CSS] 테이블이나 레이어를 삐져나가는 글자 정리하기! - CSS 워드랩(Word Wrap) (0) | 2008.06.22 |