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 | 29 | 30 | 31 |
Tags
- xcode
- 풀스택
- image
- php
- css3
- SWIFT
- 자바스크립트
- jQuery
- 비전공 개발자
- javascript
- hover
- MAC
- iPhone
- button
- keyframes
- 비전공자
- 개발자
- html5
- ipad
- 백엔드
- IOS
- react
- effect
- CSS
- Animation
- HTML
- iOS 개발자
- 프론트엔드
- front-end
- 애니메이션
Archives
- Today
- Total
비전공자 개발일기
Bouncing Ball 본문
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>BOUNCING BALL</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="ball"></div>
</div>
</body>
</html>
body {
background-color: #333;
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 100%;
height: 23rem;
background-color: #333;
overflow: hidden;
}
.wrapper::before {
background-color: #FFF;
content: "";
position: absolute;
border-radius: 1rem;
height: 0.15rem;
left: 2rem;
right: 2rem;
bottom: 2rem;
}
.wrapper .ball {
background-color: #FFF;
border-radius: 50%;
width: 3rem;
height: 3rem;
position: absolute;
animation: ballMovement 1.6s cubic-bezier(0, 0.98, 1, 0.99) infinite;
bottom: 2.1rem;
transform: translate(14rem, -15rem) scale(1.2, 0.5);
transform-origin: bottom;
}
@keyframes ballMovement {
0% {
transform: translate(14rem, -15rem);
}
15% {
transform: translate(7rem, 0rem) scale(1.2, 0.5);
}
30% {
transform: translate(2rem, -10rem) scale(1, 1);
}
45% {
transform: translate(-2rem, 0rem) scale(1.2, 0.8);
}
60% {
transform: translate(-5rem, -5.5rem) scale(1, 1);
}
75% {
transform: translate(-8rem, 0rem) scale(1.1, 0.9);
}
100% {
transform: translate(-14rem, -3rem) scale(1, 1);
}
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Confetti Text Effect (0) | 2023.02.09 |
---|---|
Send Button Animation (0) | 2023.02.08 |
Pulse effect on button hover (0) | 2023.02.06 |
Cocacola (0) | 2023.02.05 |
Movie Streaming Website (0) | 2023.02.04 |