jq之animate()队列
生活随笔
收集整理的這篇文章主要介紹了
jq之animate()队列
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>jq之demo</title><!--線上jq庫--><script src="https://code.jquery.com/jquery-3.4.1.min.js"></script><script>$(document).ready(function(){$("button").click(function(){/*動(dòng)畫*/var div=$("div");div.animate({height:'300px',opacity:'0.4'});div.animate({width:'300px',opacity:'0.8'});div.animate({height:'50px',opacity:'0.4'});div.animate({width:'50px',opacity:'0.8'});});});</script>
</head>
<body>
<button>開始</button>
<p>html元素想要移動(dòng)把position設(shè)為relative,fixed或absolute</p>
<div style="background: aqua;height: 50px;width: 50px;"></div>
</html>
總結(jié)
以上是生活随笔為你收集整理的jq之animate()队列的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Tcp实现文件上传
- 下一篇: Python next 函数 - Pyt