鼠标经过图片由灰色变彩色
来源:互联网 发布:要怎么样才能精通java 编辑:程序博客网 时间:2024/05/17 06:23
<!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=utf-8" />
<title>CSS 图片由灰色变彩色</title>
<style type="text/css">
*{margin:0;padding:0;}
img{border:0;}
#container{margin:20px auto;width:960px;overflow:hidden;}
#frmsearch{margin:0 auto;width:345px;height:142px;overflow:hidden;}
#frmsearch h2{margin:0 auto;width:100%;height:23px;line-height:23px;overflow:hidden;text-indent:-9999px;font-size:14px;color:#FFF;}
#frmsearch input{float:left;width:290px;height:22px;margin:24px 25px 0 30px;display:inline;border:0;}
#frmsearch button{float:left;width:70px;height:27px;margin:29px 0 0 250px;cursor:pointer;display:inline;text-indent:-9999px;clear:both;border:0;background:none;}
.frmsearch-normal{background:url(sprites.gif) 0 0 no-repeat;}
.frmsearch-active{background:url(sprites.gif) 0 -142px no-repeat;}
</style>
</head>
<body>
<div id="container">
<form name="frmsearch" class="frmsearch-normal" id="frmsearch" action="" metod="post">
<h2>查找</h2>
<input type="text" id="keyword" value="" />
<button type="submit" id="btnsearch">查找</button>
</form>
</div>
<script type="text/javascript">
(function(){
var D = document, frm = D.getElementById('frmsearch');
if(!frm){
return false;
}
frm.onmouseover = function(){
this.className = 'frmsearch-active';
};
frm.onmouseout = function(){
this.className = 'frmsearch-normal';
};
})();
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS 图片由灰色变彩色</title>
<style type="text/css">
*{margin:0;padding:0;}
img{border:0;}
#container{margin:20px auto;width:960px;overflow:hidden;}
#frmsearch{margin:0 auto;width:345px;height:142px;overflow:hidden;}
#frmsearch h2{margin:0 auto;width:100%;height:23px;line-height:23px;overflow:hidden;text-indent:-9999px;font-size:14px;color:#FFF;}
#frmsearch input{float:left;width:290px;height:22px;margin:24px 25px 0 30px;display:inline;border:0;}
#frmsearch button{float:left;width:70px;height:27px;margin:29px 0 0 250px;cursor:pointer;display:inline;text-indent:-9999px;clear:both;border:0;background:none;}
.frmsearch-normal{background:url(sprites.gif) 0 0 no-repeat;}
.frmsearch-active{background:url(sprites.gif) 0 -142px no-repeat;}
</style>
</head>
<body>
<div id="container">
<form name="frmsearch" class="frmsearch-normal" id="frmsearch" action="" metod="post">
<h2>查找</h2>
<input type="text" id="keyword" value="" />
<button type="submit" id="btnsearch">查找</button>
</form>
</div>
<script type="text/javascript">
(function(){
var D = document, frm = D.getElementById('frmsearch');
if(!frm){
return false;
}
frm.onmouseover = function(){
this.className = 'frmsearch-active';
};
frm.onmouseout = function(){
this.className = 'frmsearch-normal';
};
})();
</script>
</body>
</html>
0 0
- 鼠标经过图片由灰色变彩色
- 鼠标经过图片由灰色变彩色
- CSS实现鼠标经过图片由黑白变彩色
- JS---- 图片由灰色变彩色(默认显示为灰色)。IE6为彩色
- 默认图片是灰色鼠标放上去变彩色css效果代码(仅支持ie)
- ie8浏览器中兼容ie7/网站由彩色变灰色
- android 把图片状态由彩色变成灰色
- 鼠标经过图片,图片在其它的地方变…
- CSS滤镜问题,显示灰色,鼠标点上去变回彩色
- 网页图片变灰色
- 图片变灰色
- [java]图片彩色转灰色
- 鼠标经过显示图片
- 鼠标经过放大图片
- 鼠标经过切换图片
- 鼠标经过展开图片
- 鼠标经过展开图片
- jQuery中属性attr鼠标经过换图片且加边框与鼠标经过字体变颜色对比
- MVC、MVP、MVVM框架简析
- 文章标题
- Ios 24小时制与12小时制
- Intellij IDEA如何将普通工程转换成maven工程
- Redux 介绍
- 鼠标经过图片由灰色变彩色
- python小白学习日记1
- java.lang.UnsatisfiedLinkError: Native method not found:问题解决
- 我的第一个用lxml解析数据的代码
- 自写Js+CSS轮显效果
- Android---用Genymotion模拟器连接不上10.0.2.2:8080
- 5分钟看懂makefile
- 浅谈Java设计模式(二十三)解释器模式(Interpreter)
- c3p0、dbcp和proxool的优缺点比较及配置