复制代码 代码如下:
<!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="/UploadFiles/2021-04-02/jquery.min.js"><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="/UploadFiles/2021-04-02/201303181424386268.jpg"><img class="hv" src="http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif"></div>
</body>
</html>
<!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="/UploadFiles/2021-04-02/jquery.min.js"><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="/UploadFiles/2021-04-02/201303181424386268.jpg"><img class="hv" src="http://www.baidu.com/img/shouye_b5486898c692066bd2cbaeda86d74448.gif"></div>
</body>
</html>
标签:
js模仿,hover
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“js模仿hover的具体实现代码”评论...