I would like to brighten an image on my webpage on mouseover using css or javascript.
Ive seen some examples using opacity and filters in styles but they dont seem to work for me.
Thanks in advance
CP
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
[UPDATE]
A pure CSS solution would be to use CSS filters:
Here we add 50% brightness to all images on hover.
Why not? You can always set the background of the parent container to #fff (white) and then lower the opacity of the image.
HTML:
CSS:
Another solution is to use a JavaScript library, such as Pixastic.