![]() |
How do you highlight an image on mouse over?
I currently have the opacity set at 40. How can I create an event to highlight the image on mouseover.
Code:
<!DOCTYPE html PUBLIC |
Depends what you mean by highlight. I'm pretty sure you can just add an event listener for mouseover on whichever image you want to highlight. Once that is triggered then have Javascript give the CSS the value of box-shadow:________ (whatever properties you want). If you wanted to highlight then you most likely would pick a bright color (like yellow).
It's excellent for making stuff look aesthetically pleasing. More info: http://www.w3schools.com/cssref/css3_pr_box-shadow.asp |
Quote:
|
Recently i had a scenario where i need to pin a jgrowl message(a jquery message board).I needed a notification change through two icons one with a background darker than the other to differentaite pin & unpin..you can see the example here
http://fundapass.blogspot.in/2012/09...ith-pinup.html if you want simply a change in css,as in google home page menu bar this will do the trick Code:
$('#panelroot > a').hover( |
Quote:
And you certainly don't need the horrible horrible code that DrunkWalker produces. Just do it *ALL* with CSS: Code:
<style type="text/css"> |
You can even swap images vis CSS and :hover.
Just use a BACKGROUND image, instead of <img> tag. And then just change background-image: url('/images/whatever.png'); in the :hover part of your CSS. |
| All times are GMT +1. The time now is 09:24 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.