»
EnglishFrenchVietnamese

Print - Applying border & opacity to images onMouseover in CSS - JavaScriptBank.com

Full version: jsB@nk » Snippet » Applying border & opacity to images onMouseover in CSS
URL: https://www.javascriptbank.com/applying-border-opacity-to-images-onmouseover-in-css.html

Applying border & opacity to images onMouseover in CSS © JavaScriptBank.comThis JavaScript will apply border and optical to images onmouseover by using CSS.

Full version: jsB@nk » Snippet » Applying border & opacity to images onMouseover in CSS
URL: https://www.javascriptbank.com/applying-border-opacity-to-images-onmouseover-in-css.html



CSS
<style type="text/css">.borderit img{border: 1px solid #ccc;}.borderit:hover img{border: 1px solid navy;}.borderit:hover{color: red; /* irrelevant definition to overcome IE bug */}</style><style type="text/css">.opacityit img{filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);-moz-opacity: 0.4;}.opacityit:hover img{filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);-moz-opacity: 1;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<a href="http://javascriptbank.com" class="borderit"><img border="0" src="../image/gif_logojsb2.gif" /></a><a href="http://javascriptbank.com" class="opacityit"><img border="0" src="../image/gif_logojsb2.gif" /></a><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->