javascript - Color overlay on hover: jquery mosaic plugin -
how apply cover overlay on hover mosaic elements here: http://tympanus.net/development/gridloadingeffects/index.html
the effect trying achieve can seen here: http://ultravisualtheme.tumblr.com/
i copy second link, can't make sense of code. reason ask doing first link because can understand whats going on there, , code site in similar manner.
basically, have create overlay on top of div contains image. make children of div , use css:
#image:hover > .overlay { width:100%; height:100%; position:absolute; background-color:#000; opacity:0.5; border-radius:30px; }
you not need jquery here.
fiddle: http://jsfiddle.net/6bjtq/
but if want use jquery anyway, use:
$("#image").hover(function() { $(".overlay").css({//here goes same css definition}); }, function() { $(".overlay").css({//reset css default values after hover out}); });
Comments
Post a Comment