DEV Community

Cover image for 8 Games to learn CSS the fun way

8 Games to learn CSS the fun way

Andreas on October 24, 2019

I must admit, I have trouble remembering things. Especially when it comes to CSS. The Flexbox Layout for example. The property justify-content of a...
Collapse
 
tomlienard profile image
Tom Lienard

Yop, solved the last level of Flexbox Froggy, very interesting game !

Here is the solution I found if you want to try :

flex-direction: column-reverse;
flex-wrap: wrap-reverse;
justify-content: center;
align-content: center;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
devmount profile image
Andreas

Awesome, congrats! 👏🏻

Can you recheck your solution? I think you have a small mistake - align-content needs to have the value space-between for me 😇

Collapse
 
tomlienard profile image
Tom Lienard

Oh yup you're right, mistake while copying, sorry for this ^

Collapse
 
elijahlynn profile image
Elijah Lynn

Might want to prefix your post with SPOILER:.

Collapse
 
clment_kerviche_79b75f73 profile image
Clément Kerviche

you can save a line of CSS by doing like this:

flex-flow:column-reverse wrap-reverse;
justify-content:center;
align-content:space-between

Collapse
 
monishsoni profile image
MonishSoni

you can write

flex-flow: column-reverse wrap-reverse;

Collapse
 
tretuna profile image
Tre Tuna

How could a list of CSS games be complete without Dave Geddes's creations?

Flexbox Zombies (free) - mastery.games/p/flexbox-zombies
Grid Critters ($179 and worth it) - gridcritters.com/

He also has another free game on Service Workers that's partly available as he's developing it. serviceworkies.com/

Collapse
 
monacodelisa profile image
{{ MonaCodeLisa }} • Edited

$179 or even the reduced price of $99 is way too expensive for a game of this type... It is supposed to be fun and educational, this price wipes out both those qualities at the same time...

Collapse
 
devmount profile image
Andreas

Yes, agree with you here. At the time of writing this article, those games were free.

Collapse
 
devmount profile image
Andreas

Thank you for these recommendations! Didn't know about Dave Geddes's games until now! I added a bonus section with these games to this post ✔️

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
alvaromontoro profile image
Alvaro Montoro

Yay! I did one of those! :D

Collapse
 
devmount profile image
Andreas

Yes! How awesome that you're on dev.to too! Thank you for building inspiring things 💪🏻!

Collapse
 
alvaromontoro profile image
Alvaro Montoro

If you liked the Tic-Tac-Toe, there some more CSS games here.

Collapse
 
maurisioluccef profile image
Mauritsio Luffer

Very interesting! I start practicing CSS for my gaming sites. Now I am doing it for Play Ojo games at my site online. Actually, I am surprised how many new options it can open.

Collapse
 
devmount profile image
Andreas

Totally true! CSS is by now much more powerful than it seems. Great work, keep it up!

Collapse
 
invot profile image
invot

I love each and every one of these. Having an instinctual understanding of "the grid" is what will ultimately ensure your sanity.

Now if only we can go about gamifying SASS/LESS concepts. I wish there were more functions/mixins in my stylesheets.

Collapse
 
devmount profile image
Andreas

Awesome idea! It was the same for me with SASS. Make sure to look at this SASS in 15 minutes tutorial - it shows all core concepts with examples and with a little bit of practice, mixins will quickly become demystified :)

Collapse
 
monacodelisa profile image
{{ MonaCodeLisa }}

Yes I just solved Flexbox Froggy lvl 24, I ended up using 3 lines and that's how I learned that properties can be grouped in flex-flow. Really fun game can't wait to try thew rest :)

Collapse
 
devmount profile image
Andreas

Well done! 👏🏻
(and sorry for the late reply - didn't see any notification of your comment)

Collapse
 
pypaut profile image
Geoffrey

This post spawned just when I needed it. Will totally start learning CSS with this.
Thank you!

Collapse
 
devmount profile image
Andreas • Edited

I'm so glad to hear this! If you're starting with CSS, game 4 (the CSS Diner) would be a good choice, for selectors are one of the most basic things. I hope you enjoy your CSS journey!

Collapse
 
vagoel profile image
Varun

Wonderful.Fun way to learn CSS

Collapse
 
juliannicholls profile image
Julian Nicholls

I'd already played the Flexbox Froggy and Grid Garden, both excellent.
I just played Flexbox Defense and managed to score 100 on every level, albeit on a second attempt on one of them.

Collapse
 
devmount profile image
Andreas

Nice work, congrats! 🎉

Collapse
 
zuccberg090 profile image
Zucc Berg

Two years back i started learning CSS, being a developer is very hectic. Then i start making games and change their features and sell my products to gaming websites. Recently, i sold updated vweion of Pubg Mobile. It was fun 😁😁

Collapse
 
haris_virk_2aa9f18a04921b profile image
Haris Virk • Edited

Thanks for sharing a beautiful piece of information. All CCS games are great and lots of fun, Feel free to check thexploretech.com/free-sports-stre...

Collapse
 
devmount profile image
Andreas

You're welcome.

Collapse
 
jord_91 profile image
jorden

thanks will check about restore and renew

Collapse
 
chinchang profile image
Kushagra Gour • Edited

Hey Andreas! You might want to include CSSBattle in this amazing list - cssbattle.dev
Do check it out!

Collapse
 
devmount profile image
Andreas

Awesome ressource! Thanks for this addition 👏🏻

Collapse
 
chinchang profile image
Kushagra Gour

Thanks for adding CSSBAttle! One small thing - the link of the website is wrong :) It should be cssbattle.dev

Thread Thread
 
devmount profile image
Andreas

My fault, should be fixed now! Thanks.

Collapse
 
glod999 profile image
Galante

Fun stuff! I kinda lost connection with CSS but looks like you awakened my interest. I'll need it at this BetWinner project soon anyway.

Collapse
 
devmount profile image
Andreas

Glad I could bring some interest in CSS back. Good luck with your project!

Collapse
 
gamedvacom profile image
GameDVA

These css games really remind me of childhood even though it came into being later and practically based on iframe. Currently, android games are much more popular, there are many websites that offer free games such as gamedva.com

Collapse
 
molecula451 profile image
Paul

CSS Diner Great Resource to test some skills.

Collapse
 
devmount profile image
Andreas

That's true - especially for the [attribute...] selectors! A very good exercise to distinguish between [attribute^="value"], [attribute$="value"] and [attribute*="value"] 😅

Collapse
 
biswaviraj profile image
Biswajeet Das

I've played the first 3 games.
The carnival one seems interesting I will give it a try

Collapse
 
devmount profile image
Andreas

Awesome! Took me quite some time to finish the Grid Garden 😅

Collapse
 
7qruzer profile image
Kumar Gaurav

CSS diner is the most useful game for me as I am in-charge of training new batch at our company... I will use it to teach CSS to the new batch now-onwards.

Collapse
 
devmount profile image
Andreas

So glad it's useful for you! And thanks for sharing knowledge with newcomers - keep it up!

Collapse
 
stephanie profile image
Stephanie Handsteiner • Edited

I first-tried the Roadmap thingy, using the MBPs touchpad might've helped a little with that. 😁

Collapse
 
devmount profile image
Andreas

Haha nice one! It surely depends on the input device 🕹️

Collapse
 
adnantanveer10 profile image
Adnan Tanveer

Check out this this android game: dapks.com/afk-arena-mod-apk/
I would like someone to let me know how this game would be created on kotlin.
Would really appreciate the help!

Collapse
 
apkmie profile image
Apkmie

check out this also Buy Tourmaline

Collapse
 
jord_91 profile image
jorden

Thanks i will check it after Magic Mushroom Retreat

Collapse
 
rasyidmp profile image
Halimur Rasyid MP

solved the last level of Flexbox Froggy,

flex-direction: column-reverse;
align-content: space-between;
justify-content: center;
flex-wrap: wrap-reverse;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
unodwicho profile image
UnoDwicho

Just in case, in the first paragraph you're talking about justify-items which is ignored when used on a Flexbox container (as per the MDN doc). Maybe you were talking about justify-content?

Collapse
 
devmount profile image
Andreas

My fault, you're totally right! Updated it with justify-content - thanks for pointing out!

Collapse
 
elijahlynn profile image
Elijah Lynn • Edited

Flexbox Zombies link is broken/404. Here is working link, and it is still free fwiw > flexboxzombies.com/ > mastery.games/flexboxzombies/.

Collapse
 
devmount profile image
Andreas

Good catch, thank you for this hint! I fixed it 🔨👍🏻

Collapse
 
techpoint4 profile image
limited supply

If you want all the latest version with free use then don't forget to visit here.

Collapse
 
jack13804 profile image
GroupsLinker

I love your WorkThanks for sharing.

Collapse
 
vupadhayayx86 profile image
vupadhayayx86

Only the last level was tricky, rest all level were easy-peasy!

Image description

Collapse
 
trafalgarlaw profile image
Roshan Khausiya

Great article I played them and enjoyed started coding too anyway
and dont forget to check Thehimalayantime

Collapse
 
karinliegmann profile image
Karin Liegmann

Thank you for the great article!
I noticed that the link to Flexbox Zombies is outdated. The new link is as follows:
mastery.games/flexboxzombies/

Collapse
 
devmount profile image
Andreas

You're right, thank you for this hint! I fixed it 🔨👍🏻

Collapse
 
klisostom profile image
Klisostom

Flexbox Froggy (flexboxfroggy.com) - level 24:

flex-flow: column-reverse wrap-reverse;
align-items: flex-end;
justify-content: center;
align-content: space-between;

Collapse
 
dwarfstar099 profile image
Kumar Gourav

It will even work without
align-items: flex-end;

Collapse
 
dwarfstar099 profile image
Kumar Gourav

Yay! I solved the last Exercise. It was truly rewarding, helped me understand CSS Flexbox.

flex-flow: column-reverse wrap-reverse;
justify-content: center;
align-content: space-between; 
Enter fullscreen mode Exit fullscreen mode
Collapse
 
jonsonmlm87 profile image
Finance Mlm

If you want best video editor. then install Alight Motion.

Collapse
 
janes profile image
jane • Edited

thanks for sharing with us..
Beach Bootcamp

Collapse
 
pratik11939 profile image
Pratik11939

don't forget to check techtrickers.com

Collapse
 
janes profile image
jane • Edited

ok checking this. yoga hotels

Collapse
 
pratik11939 profile image
Pratik11939

Dont forget to check Techtrickers

Collapse
 
apkarctic profile image
apkarctic

Unique and informative article on this topic TikTok