Realistic Red Switch (Pure CSS)

ykadosh

Yoav Kadosh

Posted on March 15, 2021

Realistic Red Switch (Pure CSS)

This is my attempt at making a realistic switch using CSS only. I'm using multiple CSS techniques here, including gradients, 3D transformations, animations, and transitions.

Making realistic 3D elements in CSS is kind of like making a very low-poly version of a high-poly model. In this example, I made the button out of 3 "polygons" (3 divs) that are all at 90 degrees from each other (creating like a square U shape).

Interested in a tutorial on how I made this? Let me know!

This pen is based on this beautiful Dribbble shot by Voicu Apostol https://dribbble.com/shots/14172039-3D-Red-Switch

💖 💪 🙅 🚩
ykadosh
Yoav Kadosh

Posted on March 15, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Border Animations in CSS
codepen Border Animations in CSS

November 13, 2024

CSS Music Video - No Images - Pure Code.
codepen CSS Music Video - No Images - Pure Code.

September 27, 2024

Game title in html css only
codepen Game title in html css only

June 28, 2024

Social Media Dashboard UI
codepen Social Media Dashboard UI

December 22, 2023