A5下载文章资讯

分类分类

jQuery实现的文字hover颜色渐变效果实例

2016-02-22 10:03作者:fang

本文实例讲述了jQuery实现的文字hover颜色渐变效果。分享给大家供大家参考,具体如下:

<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;">我不是淡入淡出</a>

</body>

</html>

希望本文所述对大家jQuery程序设计有所帮助。

展开全部

相关

说两句网友评论
    我要跟贴
    取消