当前位置:学学看123知识中心电脑教学网页设计鼠标移动到图片上时图片变透明的效果(兼容IE、Firefox)» 正文

鼠标移动到图片上时图片变透明的效果(兼容IE、Firefox)

[06-11 19:38:22]   来源:http://www.xxk123.com  网页设计   阅读:8534

导读: 今天在做项目时需要用到一个效果,就是鼠标移动到图片上时图片变成半透明状态,现拿来分享给大家,兼容IE、Firefox浏览器咯。 具体代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>鼠标移动到图片上时图片变透明的效果(兼容IE、Firefox)</title><style type="text/css">

鼠标移动到图片上时图片变透明的效果(兼容IE、Firefox),标签:网页设计教程,网页设计知识,http://www.xxk123.com

    今天在做项目时需要用到一个效果,就是鼠标移动到图片上时图片变成半透明状态,现拿来分享给大家,兼容IE、Firefox浏览器咯。

    具体代码如下:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>鼠标移动到图片上时图片变透明的效果(兼容IE、Firefox)</title>
<style type="text/css">
<!--
.htmer_img{
    filter:alpha(opacity=80); /* IE */
    -moz-opacity:0.8; /* Moz + FF */
    opacity:0.8; /* 支持CSS3的浏览器(FF 1.5也支持)*/
}
-->
</style>
</head>
<body>
<img src=http://www.xxk123.com/article/"htmer.jpg" width="300" height="300" border="0" onMouseOver="this.className='htmer_img'" onMouseOut="this.className='none'" />
</body>
</html>
Tag:网页设计网页设计教程,网页设计知识电脑教学 - 网页设计

Copyright 学学看123 All Right Reserved.

1 2 3 4 5 6 7 8 9 10