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
- jQuery
- 비전공자
- 비전공 개발자
- 애니메이션
- HTML
- keyframes
- 프론트엔드
- Animation
- button
- react
- image
- css3
- php
- CSS
- effect
- IOS
- ipad
- html5
- iPhone
- MAC
- xcode
- iOS 개발자
- hover
- 개발자
- 백엔드
- SWIFT
- 풀스택
- javascript
- 자바스크립트
- front-end
Archives
- Today
- Total
비전공자 개발일기
Animated Hot Cup of Tea 본문
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>ANIMATED HOT CUP OF TEA</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="plate"></div>
<div class="cup">
<div class="top">
<div class="vapour">
<span style="--i:1"></span>
<span style="--i:3"></span>
<span style="--i:16"></span>
<span style="--i:5"></span>
<span style="--i:13"></span>
<span style="--i:20"></span>
<span style="--i:6"></span>
<span style="--i:7"></span>
<span style="--i:10"></span>
<span style="--i:8"></span>
<span style="--i:17"></span>
<span style="--i:11"></span>
<span style="--i:12"></span>
<span style="--i:14"></span>
<span style="--i:2"></span>
<span style="--i:9"></span>
<span style="--i:15"></span>
<span style="--i:4"></span>
<span style="--i:19"></span>
</div>
<div class="circle">
<div class="tea"></div>
</div>
</div>
<div class="handle"></div>
</div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #607D8B;
}
.container {
position: relative;
top: 50px;
}
.plate {
position: absolute;
bottom: -50px;
left: 50%;
transform: translateX(-50%);
width: 500px;
height: 200px;
background: linear-gradient(to right, #F9F9F9F9, #E7E7E7);
border-radius: 50%;
box-shadow: 0 35px 35px rgba(0, 0, 0, .2);
}
.plate::before {
content: '';
position: absolute;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
background: linear-gradient(to left, #F9F9F9, #E7E7E7);
border-radius: 50%;
}
.plate::after {
content: '';
position: absolute;
top: 30px;
left: 30px;
right: 30px;
bottom: 30px;
background: linear-gradient(rgba(0, 0, 0, .2), 25%, transparent, transparent);
border-radius: 50%;
}
.vapour {
position: relative;
display: flex;
z-index: 1;
padding: 0 20px;
}
.vapour span {
position: relative;
bottom: 50px;
display: block;
margin: 0 2px 50px;
min-width: 8px;
height: 120px;
background: #FFF;
border-radius: 50%;
animation: animate 5s linear infinite;
opacity: 0;
filter: blur(8px);
animation-delay: calc(var(--i) * -0.5s);
}
@keyframes animate {
0% {
transform: translateY(0) scaleX(1);
opacity: 0;
}
15% {
opacity: 1;
}
50% {
transform: translateY(-150px) scaleX(5);
}
95% {
opacity: 0;
}
100% {
transform: translateY(-300px) scaleX(10);
}
}
.cup {
position: relative;
width: 280px;
height: 300px;
background: linear-gradient(to right, #F9F9F9, #D9D9D9);
border-bottom-left-radius: 45%;
border-bottom-right-radius: 45%;
}
.top {
position: absolute;
top: -30px;
left: 0;
width: 100%;
height: 60px;
background: linear-gradient(to right, #F9F9F9, #D9D9D9);
border-radius: 50%;
}
.circle {
position: absolute;
top: 5px;
left: 10px;
width: calc(100% - 20px);
height: 50px;
background: linear-gradient(to left, #F9F9F9, #D9D9D9);
border-radius: 50%;
box-sizing: border-box;
overflow: hidden;
}
.tea {
position: absolute;
top: 20px;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(#C57E65, #E28462);
border-radius: 50%;
}
.handle {
position: absolute;
right: -70px;
top: 40px;
width: 160px;
height: 180px;
border: 25px solid #DCDCDC;
border-left: 25px solid transparent;
border-bottom: 25px solid transparent;
border-radius: 50%;
transform: rotate(42deg);
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Arrow Magic Menu Indicator (0) | 2022.06.28 |
---|---|
3D Text Animation Effect (0) | 2022.06.27 |
Dark Card Hover Effect (0) | 2022.06.25 |
Animated Magic Menu Indicator (0) | 2022.06.24 |
Switch Text Effect (0) | 2022.06.23 |