鼠标移动到图片透明度改变

2015-11-14 0 358
鼠标移动到图片透明度改变
<!doctype html>
<html>
	<head>
		<meta http-equiv="content-type " content="text/html"></meta>
	</head>
	<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
	<script>
	  $(function () {
          $("img").fadeTo("slow", 0.5);			
		  $("img").hover(function(){
            $(this).fadeTo("slow", 1.0); // 设置透明度为100%
          },function(){
             $(this).fadeTo("slow", 0.5); // 设置不透明度mouseout回到50%
          });		
      });

	</script>
   <body>	
	 <img src="image/p1.jpg"/>
   </body>	
</html>

遇见资源网 html 鼠标移动到图片透明度改变 http://www.ox520.com/14496.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务