Js:
Код: Выделить всё
let trilho = document.getElementById('trilho')
let body = document.querySelector('body')
trilho.addEventListener('click', ()=>{
trilho.classList.toggle('dark')
body.classList.toggle('dark')
})
Код: Выделить всё
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
box-sizing: border-box;
}
body {
height: 100px;
width: 100%;
background-color: #fafafa;
}
/* DARK MODE */
.trilho {
width: 70px;
height: 30px;
background-color: #6e6d6d;
border-radius: 70px;
position: relative;
cursor: pointer;
}
.trilho .indicador {
width: 30px;
height: 30px;
background-color: #000;
border-radius: 50%;
transform: scale(.8);
position: absolute;
left: 0;
transition: .5s;
}
.trilho.dark {
background-color: #c3c3c3;
}
.trilho.dark .indicador {
left: 38px;
background-color: #fff;
}
body.dark .container {
background-color: #000;
}
body.dark footer {
background-color: #000;
}
body.dark header {
background-color: #000;
}
body.dark h1 {
color: #fff;
}
body.dark a {
color: #fff;
}
body.dark form{
box-shadow: none;
}
body.dark .rodape{
color: #fff;
}
Код: Выделить всё
Website
[*]
[list]
[url=/]link[/url]
[*][url=/]link[/url]
[*][url=#]link[/url]
[/list]
Website
Website
Подробнее здесь: https://stackoverflow.com/questions/791 ... al-storage