Skip to content

Snake Game implemented mostly using CSS animations and abusing the DOM

Notifications You must be signed in to change notification settings

martme/css-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple game of Snake in CSS

The snake is represented as an ordered collection of list items, decorated with html-attributes - the html-attributes are recognized by the stylesheet which uses animations to make the snake move.

< 100 lines of spaghetti javascript makes sure the attributes are updated to the correct values after each animation iteration.

Why? Because inspecting the DOM while playing is mesmerizing!

Example gameplay

About

Snake Game implemented mostly using CSS animations and abusing the DOM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published