'filter' Example : filter : CSS Attributes and Javascript Style Properties HTML CSS TUTORIALS


HTML CSS TUTORIALS » CSS Attributes and Javascript Style Properties » filter »

 

'filter' Example



    
<html>
<head>
<script language="JavaScript">
function function1(elem) {
   elem.style.filter="blendTrans(duration=1)";
   elem.filters.blendTrans.Apply();
   elem.style.visibility="hidden";
   elem.filters.blendTrans.Play();
   elem.filters.percent=20
}
function function2(elem) {
   elem.style.filter="blendTrans(duration=1)";
   elem.filters.blendTrans.Apply();
   elem.style.visibility="visible";
   elem.filters.blendTrans.Play();
   elem.filters.percent=80

</script>
</head>
<body>
<img id="myImg" src="http://www.navioo.com/style/logo.png">
   <button onclick="function1(myImg)">Cause the image to fade out</button>
   <button onclick="function2(myImg)">Cause the image to fade in</button>
</body>
</html>

    
      
      



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo CSS Attributes and Javascript Style Properties
» filter