源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

js模仿hover的具体实现代码

  • 时间:2021-10-14 04:18 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:js模仿hover的具体实现代码
[u]复制代码[/u] 代码如下:
<!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>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部