现在的位置: 首页 > 综合 > 正文

半透明 转载

2013年01月21日 ⁄ 综合 ⁄ 共 826字 ⁄ 字号 评论关闭

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>鼠标经过图片半透明效果,支持Firefox/IE</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
      body {background:#000;}
      .img_link{filter:alpha(opacity=50); /* IE */
            -moz-opacity:0.5; /* Moz + FF */
            opacity:0.5; /* 支持CSS3的浏览器(FF 1.5也支持)*/
          }
      .img_link:hover {
            filter:alpha(opacity=100); /* IE */
            -moz-opacity:1; /* Moz + FF */
           opacity:1; /* 支持CSS3的浏览器(FF 1.5也支持)*/
           }
    </style>
  </head>
  <body>
   <img class="img_link" src="http://www.tmxhx.com/attachments/month_0808/k2008823103739.jpg" alt="测试效果"  onMouseOver="this.className='null'" onMouseOut="this.className='img_link'" />
  </body>
</html>

抱歉!评论已关闭.