css dark mode toggle
/* Answer to: "css dark mode toggle" */
/*
Switch between dark and light mode with CSS and JavaScript using
the tutorial you find at W3Schools, here's a link:
Switch between dark and light mode with CSS and JavaScript.
*/
body {
padding: 25px;
background-color: white;
color: black;
font-size: 25px;
}
.dark-mode {
background-color: black;
color: white;
}
/*
JavaScript:
function myFunction() {
var element = document.body;
element.classList.toggle("dark-mode");
}
*/
Also in CSS:
- css last child
- absolute path and relative path
- how to link your css file to html
- no repeat background
- css all children of type
- eloquent map collection
- css center element on screen
- css backgroud position
- comment css
- angular headers for enc type
- pseudo elements css
- css before is not working
- textarea placeholder
- select third element of an id css
- To set HTML attribute and css styles in html helper control in mvc
- stop padding from changing div size
- equivalent zoom css
- css smooth text shadow
- css
- css center image
- css no overflow
- how to get my footer to the bottom of the page using css
- .alert-validation css
- keyframe in css