is there html code that can change the color or letters in realtime?

for example: the background is white so the letters are black, but when you scroll down and there is a black image or black background, the color changes to white. anything like that? or close to it?

Public Comments

  1. You might look into javascript event such as onMouseOver but the page won't know when to change until you tell it to via some sort of javascript eventhandler.
  2. Here is an example:- <html> <head> <style> .backgr { background-color: black; color: white } </style> </head> <body> <p>This a normal paragraph</p> <p class="backgr">This is a white on black paragraph</p> </body> </html>
  3. Not in pure html, you'll need to use javascript and css to accomplish something like that. There is a window event called scroll which will help. Id also look at scripts which can change the color of items biased on a timer. Between those scripts you should be able to find something that will help you.
Powered by Yahoo! Answers