jQuery实现鼠标经过显示动画边框特效
网络编程 2021-07-04 18:31www.168986.cn编程入门
本文主要介绍了jQuery鼠标经过显示动画边框特效的实例代码。具有很好的参考价值。狼蚁网站SEO优化跟着长沙网络推广一起来看下吧
原效果用addClass 改为slideUp,纯学习
效果图
代码如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="css.css" rel="external nofollow" > <title>Document</title> </head> <body> <style type="text/css"> {margin:0;padding:0;list-style-type:none;} a,img{border:0;} a{color:#000;text-decoration: none;font-weight: 600} body{font:12px/180% Arial, Helvetica, sans-serif, "新宋体";} .sph{ width: 1300px; margin: 0 auto; padding: 100px 0; } .spbq{ width: 250px; height: 250px; float: left; line-height: 2; padding: 10px 10px 0 20px; margin: 20px; position: relative; overflow: hidden; } .spbq h2{ color: #14191e; font: bold 14px/18px "Microsoft Yahei","Hiragino Sans GB",Helvetica,"微软雅黑",Tahoma,Arial,sans-serif; margin-: 18px; } .spbq span{ display: block; color: #b4bbbf; font: 12px/18px "Microsoft Yahei","Hiragino Sans GB",Helvetica,"微软雅黑",Tahoma,Arial,sans-serif; margin: 8px 0; } .spbq b{ color: #787d82; font: 12px/18px "Microsoft Yahei","Hiragino Sans GB",Helvetica,"微软雅黑",Tahoma,Arial,sans-serif; } .biankuang{ width: 3px; height: 3px; position: absolute; z-index: 99; border-radius:10px; /background: black;/ } .biankuang_1{ height: 3px; : -6px; left:0px; border-left: 3px solid #EB5858; } .biankuang_2 { width: 0px; bottom:-3px; left: 0px; border-: 3px solid #EB5858; } .biankuang_3{ height: 0px; bottom:0px; right:0px; border-right: 3px solid #EB5858; } .biankuang_4{ width:0px; :-3px; right:0px; border-bottom: 3px solid #EB5858; } .text_gobuy { position: absolute; z-index: 9; bottom: 0; left: 0px; width: 280px; height: 50px; overflow: hidden; background-color: rgba(32, 32, 33,0.5); cursor: pointer; display: none; text-align: center; } .text_gobuy_show{ padding: 20px 15px ; opacity: 1; } .spbq p{ position: absolute; bottom:10px; left:110px; line-height: 33px; color: #fff } </style> </head> <body> <div class="sph"> <div class="spbq"> <div class="biankuang biankuang_1"></div> <div class="biankuang biankuang_2"></div> <div class="biankuang biankuang_3"></div> <div class="biankuang biankuang_4"></div> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><div class="zst"><img src="http://.jq22./demo/jQuery-hover20161208/images/0-135.jpg" alt=""></div><h2>jQuery基础课程</h2><span>让jQuery带您进入网页动态交互世界,为...</span><b>更新完毕 15783人学习</b></a> <div class="text_gobuy"> <br/> <p>9小时17分钟 | 初级</p> <br/> </div> </div> <div class="spbq"> <div class="biankuang biankuang_1"></div> <div class="biankuang biankuang_2"></div> <div class="biankuang biankuang_3"></div> <div class="biankuang biankuang_4"></div> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><div class="zst"><img src="http://.jq22./demo/jQuery-hover20161208/images/0-135.jpg" alt=""></div><h2>jQuery基础课程</h2><span>让jQuery带您进入网页动态交互世界,为...</span><b>更新完毕 15783人学习</b></a> <div class="text_gobuy"> <br/> <p>9小时17分钟 | 初级</p> <br/> </div> </div> <div class="spbq"> <div class="biankuang biankuang_1"></div> <div class="biankuang biankuang_2"></div> <div class="biankuang biankuang_3"></div> <div class="biankuang biankuang_4"></div> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><div class="zst"><img src="http://.jq22./demo/jQuery-hover20161208/images/0-135.jpg" alt=""></div><h2>jQuery基础课程</h2><span>让jQuery带您进入网页动态交互世界,为...</span><b>更新完毕 15783人学习</b></a> <div class="text_gobuy"> <br/> <p>9小时17分钟 | 初级</p> <br/> </div> </div> <div class="spbq"> <div class="biankuang biankuang_1"></div> <div class="biankuang biankuang_2"></div> <div class="biankuang biankuang_3"></div> <div class="biankuang biankuang_4"></div> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><div class="zst"><img src="http://.jq22./demo/jQuery-hover20161208/images/0-135.jpg" alt=""></div><h2>jQuery基础课程</h2><span>让jQuery带您进入网页动态交互世界,为...</span><b>更新完毕 15783人学习</b></a> <div class="text_gobuy"> <br/> <p>9小时17分钟 | 初级</p> <br/> </div> </div> </div> <script src="http://.jq22./jquery/jquery-1.10.2.js"></script> <script type="text/javascript"> function biankuang(obj) { $(obj).find('.biankuang_1').s(true).animate({ height: '305px' }, 300) $(obj).find('.biankuang_2').s(true).delay('300').animate({ width: '305px' }, 300) $(obj).find('.biankuang_3').s(true).animate({ height: '305px' }, 300) $(obj).find('.biankuang_4').s(true).delay('300').animate({ width: '305px' }, 300) } function biankuang1(obj) { $(obj).find('.biankuang_1').animate({ height: '0' }, 100) $(obj).find('.biankuang_2').animate({ width: '0' }, 100) $(obj).find('.biankuang_3').animate({ height: '0' }, 100) $(obj).find('.biankuang_4').animate({ width: '0' }, 100) } $('.spbq').hover(function() { var obj = $(this); obj.find('.text_gobuy').slideDown(300); biankuang(obj); }, function() { var obj = $(this); obj.find('.text_gobuy').slideUp(300); biankuang1(obj); }) </script> </body> </html>
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望多多支持狼蚁SEO!
编程语言
- 如何快速学会编程 如何快速学会ug编程
- 免费学编程的app 推荐12个免费学编程的好网站
- 电脑怎么编程:电脑怎么编程网咯游戏菜单图标
- 如何写代码新手教学 如何写代码新手教学手机
- 基础编程入门教程视频 基础编程入门教程视频华
- 编程演示:编程演示浦丰投针过程
- 乐高编程加盟 乐高积木编程加盟
- 跟我学plc编程 plc编程自学入门视频教程
- ug编程成航林总 ug编程实战视频
- 孩子学编程的好处和坏处
- 初学者学编程该从哪里开始 新手学编程从哪里入
- 慢走丝编程 慢走丝编程难学吗
- 国内十强少儿编程机构 中国少儿编程机构十强有
- 成人计算机速成培训班 成人计算机速成培训班办
- 孩子学编程网上课程哪家好 儿童学编程比较好的
- 代码编程教学入门软件 代码编程教程