Loraine Vilches
Posted on April 18, 2022
If you want your switch to work, you need to transform it into a checkbox element, otherwise, you will not be able to know if it is "on" or "off".
So, there's a simple way to do it. Create an box around it and hide the checkbox, and, with a little "css-animation", done.
Here, you will only need to:
- Put it inside a div and position then in your layout
- Change the background-color(s)
๐ ๐ช ๐
๐ฉ
Loraine Vilches
Posted on April 18, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
codepen Awesome Social Media Icons With Hover Effects (Font Awesome Icons & SVG Icons)
January 6, 2023