VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
Pacman & Ghost Animation: CSS Tutorial (Day 17 of CSS3 in 30 Days)

Pacman & Ghost Animation: CSS Tutorial (Day 17 of CSS3 in 30 Days)

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Use CSS to create n animation of Pacman chomping and chasing a ghost along this container element! --Files you need -- -Pacman Code: https://www.dropbox.com/sh/k52690nidi673el/AAAcSxszWSiofZfX4jRaC87Aa?dl=0 -All tutorials in this series need this _theme-styles directory (only download once): https://www.dropbox.com/sh/890hx6ke34oovaz/AAByJ-jb-H5pWuIUx7t_GvQqa?dl=0 This video works as a stand-alone tutorial but is also day 13 of CSS3 in 30 Days. For the rest of the series, check out this playlist: https://www.youtube.com/playlist?list=PLWKjhJtqVAbl1AfjiGyYxwpdAPi5v-1OU CSS3 in 30 Days is developed by Brad Hussey. Check out his website for more great tutorials: https://codecollege.ca/
Date: 2022-03-14

Comments and reviews: 4


Osum!!! would've been kooler if there was a way of getting the dots disappear off but, crazy nonetheless!
EDIT:
k.. so I made that work by creating another empty div inside path (named it .path1) and transitioning its width to 1400px as ease-out with delay of 1.8s.. it does appear as if the pacman is eating away the dots but not that well though cause his chomps are kinda eating them away before he comes closer LOL (cause ease-out, right?) no other transition seemed to work out better.. linear was a disaster and so were others.. this was as much as I could do:
.path1 -
position: relative;
width: 10px;
height: 100%;
background: #333;
padding: 20px;
box-sizing: border-box;
overflow: hidden;
animation: disappear 5s ease-out infinite;
animation-delay: 1.8s;
z-index: 99;
-
.path1:after -
content: --;
position: absolute;
border: none;
color: #333;
-
-keyframes disappear -
0% -
width: 10px;
-
100% -
width: 1400px;
-
-

reply

Try to add this pseudo after .path and see what would happen:
.path::before -
position: absolute;
content: --;
display: block;
left: -20%;
width: 20%;
height: 100%;
margin: -20px;
background: linear-gradient( to right, transparent 40%, #333 60% );
z-index: 50;
animation: moveForward 5s linear infinite;
animation-delay: 1.4s;
-

reply

Great Tutorial Thank You So Much !!! Here goes another cool animation for the ghost :
insert this into the ghost css class :
top: 45%;
animation: wavyMovement 1s linear infinite;
then add this keyframe at the end :
-keyframes wavyMovement -
0%, 100% -
top: 45%;
- 50% -
top: 55%;
-
-

reply

-show your friends, show your mom, they'll really think your cool that you spent ALOT of time, on your computer making pacman.....-
lol This outro hit me hard

reply
Add a review, comment






Other channel videos