$("#go1").toggle(function(){
$("#block1").animate( { width: "90%"}, { queue: false, duration: 5000 } )
.animate( { fontSize: '10em' } , 1000 )
.animate( { borderWidth: 5 }, 1000);
return false;
},function(){
$("#block1").animate( { width: "110%"}, { queue: false, duration: 5000 } )
.animate( { fontSize: '1em' } , 1000 )
.animate( { borderWidth: 0 }, 1000);
return false;
});
$("#go2").click(function(){
$("#block2").animate( { width: "90%"}, 3000 )
.animate( { fontSize: '10em' } , 1000 )
.animate( { borderWidth: 5 }, 1000);
return false;
});
<button id="go1">Animate Block1</button>
<button id="go2">Animate Block2</button>
<div id="block1">Block1</div>
<div id="block2">Block2</div>
字体放大效果
最新推荐文章于 2021-05-19 14:35:20 发布