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
- 백엔드
- css3
- react
- 비전공 개발자
- effect
- MAC
- 자바스크립트
- jQuery
- CSS
- 프론트엔드
- front-end
- php
- keyframes
- 비전공자
- 풀스택
- iOS 개발자
- 개발자
- iPhone
- 애니메이션
- javascript
- xcode
- IOS
- SWIFT
- hover
- HTML
- Animation
- button
- html5
- image
- ipad
Archives
- Today
- Total
비전공자 개발일기
Pac-man Loader 본문
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>PACMAN LOADER</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="pac-man"></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: #333;
}
.pac-man {
border-radius: 100em 100em 0 0 ;
transform-origin: bottom;
animation: easing-top .5s infinite;
}
.pac-man, .pac-man::before {
width: 70px;
height: calc(70px / 2);
background-color: #FED75A;
}
.pac-man::before {
content: "";
display: block;
margin-top: calc(70px / 2);
position: absolute;
transform-origin: top;
border-radius: 0 0 100em 100em;
transform: rotate(80deg);
animation: easing-bottom .5s infinite;
}
.pac-man::after {
content: "";
position: absolute;
border-radius: 100em;
display: block;
width: 20px;
height: 20px;
margin-top: calc((70px / 2 ) - 10px);
margin-left: calc((70px / 2 ) - 10px);
transform-origin: center;
animation: centers 0.5s infinite, ball 0.5s infinite linear;
}
@keyframes easing-top {
0%, 100% {
transform: rotate(-40deg);
}
50% {
transform: rotate(0);
}
}
@keyframes easing-bottom {
0%, 100% {
transform: rotate(80deg);
}
50% {
transform: rotate(0);
}
}
@keyframes centers {
0%, 100% {
transform: rotate(40deg);
}
50% {
transform: rotate(0);
}
}
@keyframes ball {
0% {
opacity: 0.7;
box-shadow: 70px 0 0 0 #FED75A, 120px 0 0 0 #FED75A, 170px 0 0 0 #FED75A,
220px 0 0 0 #FED75A;
}
100% {
box-shadow: 20px 0 0 0 #FED75A, 70px 0 0 0 #FED75A, 120px 0 0 0 #FED75A,
170px 0 0 0 #FED75A;
}
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Ghost Loader (0) | 2023.01.26 |
---|---|
3D Spinning Orbits (0) | 2023.01.25 |
Pendulum Loading (0) | 2023.01.23 |
Blob Effect Micro Interaction (0) | 2023.01.22 |
Animated Working Analog Clock (0) | 2023.01.20 |