sandoche / Darkmode.js

🌓 Add a dark-mode / night-mode to your website in a few seconds
https://darkmodejs.learn.uno
MIT License
2.71k stars 175 forks source link

The Background Colors are getten rid of whenever i add it #81

Open TheWonderTaser opened 2 years ago

TheWonderTaser commented 2 years ago

So I was testing thing and umm my background colors dont work with this its probs my stupidity but i cant seem to fix it so yea please help

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Home | Cryognal</title>
    <link rel="stylesheet" type=text/css href="./css/html.css">
  </head>
  <body>
    <script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script>
    <script>
      const options = {
        bottom: "64px", // default: '32px'
        right: "unset", // default: '32px'
        left: "32px", // default: 'unset'
        time: "0.5s", // default: '0.3s'
        mixColor: "#fff", // default: '#fff'
        backgroundColor: "#fff", // default: '#fff'
        buttonColorDark: "#100f2c", // default: '#100f2c'
        buttonColorLight: "#fff", // default: '#fff'
        saveInCookies: false, // default: true,
        label: "🌓", // default: ''
        autoMatchOsTheme: true, // default: true
      };

      const darkmode = new Darkmode(options);
      darkmode.showWidget();
    </script>
  </body>
</html>

html {
    background: #e0e0e0;
}```