This article mainly introduces jQuery's implementation of mouse-responsive Taobao animation effects, involving jQuery event response and dynamic operation of page element attributes. Friends in need can refer to the following
The examples in this article describe jQuery implementation Mouse responsive Taobao animation effect. Share it with everyone for your reference, the details are as follows:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Jquery淘宝动画</title> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.js"></script> <style> * { margin: 0; padding: 0; font-family:"微软雅黑" } #box{ padding-left:20px; background-color:#f9f9f9; border:1px solid #ccc; width:236px; height:250px; margin:0 auto; } #box a{ width:50px; height:60px; border:1px solid #ccc; float:left; margin:10px 10px; background-color:#FFFFFF; text-align:center; font-size:14px; position:relative; } #box a i{ position:absolute; top:15px; left:18px; } #box a p{ position:absolute; top:36px; left:5px; } #box a{ cursor:pointer; } </style> </head> <body> <p id="box"> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> <a><i><img src="rec_view(1).png"/></i><p>文字玩</p></a> </p> <script> $(function(){ $("#box a").mouseenter(function(){ $(this).find("i").animate({top:"-15px",opacity:"0"},300, function(){ $(this).css({top:"25px"}); $(this).animate({top:"15px",opacity:"1"},200) }) }) }); </script> </body> </html>
This animation can achieve the visual effect of the gradient flying upward when the mouse slides over.
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.
Related articles:
How to get the text information of the current element from vue.js
About vue element-ui binding What are the solutions to the invalid @keyup event?
Use jquery to click the Enter key to achieve the login effect (detailed tutorial)
The above is the detailed content of How to implement mouse-responsive Taobao animation effect in jQuery. For more information, please follow other related articles on the PHP Chinese website!