adgllorente

CSS gears project

Photo by Bill Oxford on Unsplash 路 6/3/2016

Since a few weeks ago I wanted to design a gear using only CSS. I wanted to use these gears in a future project but after finishing them, I think this is not going to be as easy as I expected 馃槉

As I have said, this is just a CSS gear, not Javascript, nothing else, just CSS and HTML (actually is Less). Every gear is composed of 3 parts:

  • The colored part of the gear
  • Four bars rotated every 45 degrees to build teeth
  • A smaller centered circle that simulates the hole of the gear.

Every gear is created using this less mixin and the HTML code shown here

You can take a look to the final result below. Of course you are free to fork this code or use it wherever you want.

See the Pen CSS Gears by Adri谩n G贸mez (@adgllorente) on CodePen.

css design less no-javascript

路 Adri谩n G贸mez

Powered by Astro + TailwindCSS + Markdown

Inspired in London and Julia