how to add css to the dark mode using css code example
Example 1: dark mode css
body {
background-color: black;
color: white;
}
@media screen and (prefers-color-scheme: light) {
body {
background-color: white;
color: black;
}
}
Example 2: css darkmode
@media (prefers-color-scheme: dark) {
}
Example 3: css dark mode
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
}