dark mode css
body {
background-color: black;
color: white;
}
@media screen and (prefers-color-scheme: light) {
body {
background-color: white;
color: black;
}
}/* 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:
- scroll animation css
- css grid example
- breakpoint bootstrap
- how to style hyperlink text css
- grid-template-areas css
- animation css
- scroll snap css
- css rules only for mozilla
- css center image
- mettre en gras css
- text shadow css generator
- css not class
- stop the client from scrolling
- custom scroll bar
- jquery add external css to head
- online bootstrap css file link
- anchor links scrolling too far
- add css file to html
- css text align left
- html font white text with black border
- css hiddden
- text vertical align css
- css transition opacity
- adding background image css