js模仿hover的具体实现代码

时间:2013-12-30    点击:88   
复制代码 代码如下:

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="this" />
<meta name="keywords" content="this" />
<title>this</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<style type="text/css">
body{margin:0;padding:0;}
.hover{float:left;position:relative;margin:0 auto;padding:0; }
.hv{position:absolute; left:0;top:0;display:none; }
</style>
<script type="text/javascript">
$(function() {
$('.hover').hover(
function (){
$('.hv').stop().fadeTo('slow',1);
},function() {
$('.hv').stop().fadeTo('slow',0);
}
)
})
</script>
</head>

<body>
<div class="hover">
<img src="http://img.vip.xunlei.com/img/banner/201303181424386268.jpg" alt="" width='100px' height='100px'>
<img class="hv" src="http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif" alt="" width='100px' height='100px'>
</div>
</body>
</html>
获取鼠标在div中的相对位置的实现代码
input链接页面、打开新网页等等的具体实现
获取3个数组不重复的值的具体实现
改变隐藏的input中value的值代码
js中switch case循环实例代码
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved