Build An Easy Light/Dark Mode Toggle With CSS & JavaScript
24.9 هزار بار بازدید -
پارسال
-
🚨🚨🚨 COURSES -
🚨🚨🚨 COURSES - https://slayingthedragon.io 🚨🚨🚨
Join the discord - Discord: discord
Codepen for this - https://codepen.io/ramzibach-the-styl...
To add dark mode to our website, we first need some elements in our HTML.
All I have is button with the class of theme-toggle and an SVG icon inside it.
Under the button, I also have an h1 that displays dark/light mode and under the h1, I have a paragraph that displays filler text.
In my CSS, I don’t have much, I just have what’s needed for the layout to be in the middle of the page....
Cursor icon from https://icons8.com/icon/14102/cursor
Join the discord - Discord: discord
Codepen for this - https://codepen.io/ramzibach-the-styl...
To add dark mode to our website, we first need some elements in our HTML.
All I have is button with the class of theme-toggle and an SVG icon inside it.
Under the button, I also have an h1 that displays dark/light mode and under the h1, I have a paragraph that displays filler text.
In my CSS, I don’t have much, I just have what’s needed for the layout to be in the middle of the page....
Cursor icon from https://icons8.com/icon/14102/cursor
پارسال
در تاریخ 1402/01/27 منتشر شده
است.
24,908
بـار بازدید شده