NEGATIVE EFFECT to webpage

1 replies
  • WEB DESIGN
  • |
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.
#effect #negative #webpage
  • Profile picture of the author JonathanKrantz
    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)
    {{ DiscussionBoard.errors[2184657].message }}

Trending Topics