Jump to content
Sign in to follow this  


Recommended Posts

I am unclear about your question.

But the more I understood, the more I would explain. Here is my code for darkmode option.

Example :

        body {
            padding: 25px;
            background-color: white;
            color: black;
            font-size: 25px;

        .dark-mode {
            background-color: black;
            color: white;


<h2>Dark mode</h2>

<p>tap the button.</p>

<button onclick="myFunction()">dark mode</button>


function myFunction() {
            var element = document.body;



I hope you'll understand.

If you have any doubt then you can freely ask.

Thank You.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...