Pacman loading animation

Developer
Size
3,052 Kb
Views
50,600

How do I make an pacman loading animation?

A pacman loading animation. To modify the animation, change either @primaryClr or @ballSize for a different color and a different size.. What is a pacman loading animation? How do you make a pacman loading animation? This script and codes were developed by Tim Guo on 03 September 2022, Saturday.

Pacman loading animation Previews

Pacman loading animation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pacman loading animation</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="pacman"> <div></div> <div></div> <div></div> <div></div> <div></div>
</div>
</body>
</html>

Pacman loading animation - Script Codes CSS Codes

/* To modify the animation, change either @primaryClr or @ballSize for a different color and a different size. */
/* LESS Vars */
/*The Pacman*/
.pacman { position: relative;
}
.pacman > div:nth-child(1),
.pacman > div:nth-child(2) { width: 0; height: 0; border: 37.5px solid #fed75a; border-right-color: transparent; border-radius: 50%; left: -60px; -webkit-animation: rotate_pacman_half_up .5s infinite; animation: rotate_pacman_half_up .5s infinite; position: relative;
}
.pacman > div:nth-child(2) { -webkit-animation-name: rotate_pacman_half_down; animation-name: rotate_pacman_half_down; margin-top: -75px;
}
.pacman > div:nth-child(3),
.pacman > div:nth-child(4),
.pacman > div:nth-child(5) { background-color: #fed75a; border-radius: 50%; width: 15px; height: 15px; position: absolute; top: 30px; left: 75px;
}
.pacman > div:nth-child(3) { -webkit-animation: pacman-balls 1s -0.66s infinite linear; animation: pacman-balls 1s -0.66s infinite linear;
}
.pacman > div:nth-child(4) { -webkit-animation: pacman-balls 1s -0.33s infinite linear; animation: pacman-balls 1s -0.33s infinite linear;
}
.pacman > div:nth-child(5) { -webkit-animation: pacman-balls 1s infinite linear; animation: pacman-balls 1s infinite linear;
}
/*Pacman Animation Keyframes*/
@-webkit-keyframes rotate_pacman_half_up { 0% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 50% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } 100% { -webkit-transform: rotate(270deg); transform: rotate(270deg); }
}
@keyframes rotate_pacman_half_up { 0% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 50% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } 100% { -webkit-transform: rotate(270deg); transform: rotate(270deg); }
}
@-webkit-keyframes rotate_pacman_half_down { 0% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } 50% { -webkit-transform: rotate(0); transform: rotate(0); } 100% { -webkit-transform: rotate(90deg); transform: rotate(90deg); }
}
@keyframes rotate_pacman_half_down { 0% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } 50% { -webkit-transform: rotate(0); transform: rotate(0); } 100% { -webkit-transform: rotate(90deg); transform: rotate(90deg); }
}
@-webkit-keyframes pacman-balls { 75% { opacity: .7; } 100% { -webkit-transform: translateX(-75px); transform: translateX(-75px); }
}
@keyframes pacman-balls { 75% { opacity: .7; } 100% { -webkit-transform: translateX(-75px); transform: translateX(-75px); }
}
/*Scaffolding*/
body,
html { height: 100%;
}
body { background-color: rgba(0, 0, 0, 0.87); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
Pacman loading animation - Script Codes
Pacman loading animation - Script Codes
Home Page Home
Developer Tim Guo
Username timothyguo
Uploaded September 03, 2022
Rating 3
Size 3,052 Kb
Views 50,600
Do you need developer help for Pacman loading animation?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tim Guo (timothyguo) Script Codes
Create amazing captions with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!