Postingan

Menampilkan postingan dari Maret, 2022

How to create simple Dark/Light mode for web using JavaScript

Gambar
Light-on-dark color scheme, also called dark mode, is a supplemental mode that uses a color scheme in which content of a webpage is displayed on a dark background. Such a color scheme reduces the light emitted by screens and enhances readability. Switching to dark mode allows website users to move to an eye-friendly and resource-saving design whenever they want.              Step 1: Create an HTML Document <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Dark/Light Mode</title>           <script src= "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js">     </script> </head>   <body>     <div class="mode">       <img sr...