jQuery implementation of text hover color gradient effect instance
- 2020-12-21 17:59:04
- OfStack
This article gives an example of jQuery's implementation of the hover color gradient. To share for your reference, the details are as follows:
<html>
<head>
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("a").hover(function(){
$("a").animate({width:"80%",height:"40%",fontSize:"100px"},1600,function(){
$("a").animate({color:"#FFFFFF"},1600);
});
},function(){
$("a").animate({color:"blue"},1600,function(){
$("a").animate({width:"100px",height:"20px",fontSize:"14px"},1600);
});
});
});
</script>
</head>
<body>
<a href="#" style="width:100px;height:20px;font-size:14px;border:red 1px solid;"> I'm not fading in and out </a>
</body>
</html>
For more information about jQuery, please refer to: Summary of jQuery Drag-and-drop Effects and Techniques, Summary of Common jQuery Classic Effects, Summary of jQuery Extension Techniques, Summary of jquery Selectors and Summary of Common jquery Techniques.
I hope this article has been helpful in jQuery programming.