У нас вы можете посмотреть бесплатно How to create a theme switcher with HTML & CSS или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
A few custom properties and the :has() selector make color theming super easy to do! Add in a bit of JS and we can save the user’s preferences in localStorage, and we’re good to go! Of course, :has() support isn’t perfect, but we can build in a quick fallback with just a little bit more JS. 🔗 Links ✅ The code from this video: https://codepen.io/kevinpowell/pen/MW... ✅ More on visually-hidden: https://www.scottohara.me/blog/2017/0... ✅ Current support for :has() - https://caniuse.com/?search=%3Ahas() ⌚ Timestamps 00:00 - Introduction 00:57 - What we’re starting with 01:58 - Setting up the color theme selector 04:04 - Hiding the labels 05:39 - Styling the color theme picker 12:05 - Adding functionality with :has() 13:48 - Using localStorage to remember the users choice 23:52 - Adding a fallback for when there is no :has() support Corrections: 24:54 I should have made separate selectors here, as this won't work in Firefox - see codepen in description for a working version 27:20 Because I moved this here, the theme should have been changed to activeTheme - see codepen in description for a working version #css -- Come hang out with other dev's in my Discord Community 💬 / discord Keep up to date with everything I'm up to ✉ https://www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 / kevinpowellcss --- Help support my channel 👨🎓 Get a course: https://www.kevinpowell.co/courses 👕 Buy a shirt: https://teespring.com/stores/making-t... 💖 Support me on Patreon: / kevinpowell --- My editor: VS Code - https://code.visualstudio.com/ --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: / kevinjpowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!