搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
JavaScript
jQuery 教程
jQuery 效果
源代码
清空
点击运行
<!DOCTYPE html> <html> <title>jQuery 动画设置多个属性示例 - 基础教程(div.cn)</title> <head> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ let div = $("div"); div.animate({width:"500px"}); div.animate({height:"200px"}); div.animate({fontSize: "10em"}); div.animate({opacity: 0.3}); }); }); </script> <style> div { height: 100px; width: 100px; margin: 10px 0; background: #ec181e; } </style> </head> <body> <button type="button">动画</button> <div>jQuery</div> </body> </html>
运行结果