250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- react
- CSS
- jQuery
- hover
- iPhone
- MAC
- effect
- 자바스크립트
- javascript
- iOS 개발자
- image
- css3
- button
- xcode
- php
- Animation
- front-end
- HTML
- keyframes
- 프론트엔드
- IOS
- ipad
- 개발자
- SWIFT
- html5
- 풀스택
- 백엔드
- 비전공 개발자
- 비전공자
- 애니메이션
Archives
- Today
- Total
비전공자 개발일기
CSS Animated Swipe 본문
728x90
SMALL
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS ANIMATED SWIPE</title>
<link rel="stylesheet" href="style.css">
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
</head>
<body>
<a href="#" class="btn">
Swipe Next
<span>
<ion-icon name="chevron-forward-outline"></ion-icon>
</span>
</a>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #28272A;
}
.btn {
position: relative;
width: 200px;
height: 60px;
background-color: rgba(255, 255, 255, .1);
border-radius: 60px;
display: flex;
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, .1);
text-decoration: none;
letter-spacing: 2px;
border-top: 0.5px solid rgba(255, 255, 255, .35);
border-left: 0.5px solid rgba(255, 255, 255, .35);
padding-left: 40px;
transition: .5s;
overflow: hidden;
}
.btn:hover {
padding-left: 0;
padding-right: 40px;
color: rgba(255, 255, 255, 1);
}
.btn span {
position: absolute;
left: 5px;
width: 50px;
height: 50px;
background-color: #04Fe4D;
border-radius: 50%;
transition: .5s ease-in-out;
display: flex;
justify-content: center;
align-items: center;
color: #1A191D;
font-size: 1.5em;
}
.btn:hover span {
left: calc(100% - 55px);
}
.btn:after {
content: '';
position: absolute;
width: 80px;
height: 100%;
z-index: 1;
background-color: rgba(255, 255, 255, .25);
transform: translateX(-170px) skewX(30deg);
transition: .75s ease-in-out;
}
.btn:hover:after {
transform: translateX(170px) skewX(30deg);
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Lighting Loader (0) | 2022.09.02 |
---|---|
Emotion Animation (0) | 2022.09.01 |
Checkbox Custom (0) | 2022.08.30 |
Lock Mobile Screen Shot (0) | 2022.08.29 |
Lamp Animation (0) | 2022.08.27 |