일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- C언어
- 개발블로그
- reallusion
- c++
- modeling
- cc4
- unreal
- C
- JavaScript
- 티스토리챌린지
- 오블완
- character
- visualstudio
- ue5
- 마야
- ANIMATION
- 3d
- 애니메이팅
- Costume
- animating
- iclone
- 프로그래밍
- js
- 언리얼엔진
- charactercreator
- 3dmodeling
- UnrealEngine
- 개발
- autodesk
- HTML
Archives
- Today
- Total
개발나라 스용공주
[실습] 보더 애니메이션 본문
728x90
728x90
이번 글은 border를 활용한 탭 메뉴 애니메이션 실습에 대한 글이다.
* border는 늘어날 수 없으므로 가상클래스로 만들어줘야함
자기자신의 X축에서 크기값을 50% 빼줘야함 (정중앙 배치)
left:50%;
transform: translateX(-50%);
[ html ]
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="css\style.css">
</head>
<body>
<ul class="gnb">
<li><a href="#none">HOME</a></li>
<li><a href="#none">ABOUT</a></li>
<li><a href="#none">SERVICE</a></li>
<li><a href="#none">PORTFOLIO</a></li>
<li><a href="#none">CONTACT</a></li>
</ul>
<script src="script\jquery-1.12.4.js"></script>
<script src="script\custom.js"></script>
</body>
</html>
[ css ]
body {
margin : 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f4f4f4;
}
a {
text-decoration: none;
color : #222;
}
.gnb {
list-style: none;
padding : 0;
width: 650px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
padding : 50px 30px;
display: flex;
}
.gnb li {
/* border : 1px solid red;
box-sizing: border-box;
float:left;
width: 120px;
text-align: center; */
flex:1;
text-align: center;
}
.gnb li a {
font-size: 14px;
position : relative;
}
.gnb li a:before {
content: '';
position: absolute;
background-color: dodgerblue;
height: 2px;
width: 0;
bottom: -10px;
left:50%;
transform: translateX(-50%);
transition: 0.5s;
}
.gnb li a:hover:before {
width: 100%;
}
728x90
728x90
'WEB > 강의 메모' 카테고리의 다른 글
[실습] JQuery를 활용한 탭메뉴 - 사용자정의 속성과 attr()을 이용한 데이터 불러오기 (0) | 2024.11.20 |
---|
Comments