NEGATIVE EFFECT to webpage

by 1 replies
2
Hi everyone! Can you help me how to turn a normal webpage into NEGATIVE? I want it to be optional so that a user can toggle anytime. The reasons has something to do with the white background which constitutes roughly 90% of average webpages. OLED displays aren't happy with whites and in fact draws three times more power than conventional TFT with white backgounds.
#website design #effect #negative #webpage
  • Make a seperate "negative" CSS file. Then use Javascript to switch the CSS files.

    A simple solution is like this:

    put this in your head

    Code:
    <link id="css1" href="normal.css" type="text/css" rel="stylesheet">
    and then have a link on a website

    Code:
    <a href="javascript:;" onclick="document.getElementById('css1').href = 'negative.css';">negative</a>
    This will make your page negative when a person clicks this anchor. It will not toggle it back to normal when click again but you can do this quite simple (i.e. set up a variable and switch it every time you click the anchor)

Next Topics on Trending Feed

  • 2

    Hi everyone! Can you help me how to turn a normal webpage into NEGATIVE? I want it to be optional so that a user can toggle anytime. The reasons has something to do with the white background which constitutes roughly 90% of average webpages. OLED displays aren't happy with whites and in fact draws three times more power than conventional TFT with white backgounds.