2 Star 6 Fork 2

ereddate/ptemplatejs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
animate.html 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
ereddate 提交于 2018-12-05 09:43 +08:00 . no commit message
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<title>ptemplatejs demo</title>
<script src="ptemplate.js"></script>
<script src="ptemplate.extend.tmplattrs.js"></script>
<script src="ptemplate.extend.tmplfilter.js"></script>
<script src="ptemplate.extend.jsonp.js"></script>
<script src="ptemplate.extend.ajax.js"></script>
<script src="ptemplate.extend.touchs.js"></script>
<script src="ptemplate.extend.animate.js"></script>
<style>
body {
background: #f4f5f7;
font-family: 微软雅黑;
}
body, ul, p {
list-style: none;
padding: 0;
margin: 0;
}
.pstyle{
font-size:1rem;
color:rgb(255,69,0);
}
.box{width:200px;height:100px;background-color:rgb(0,0,0);}
</style>
</head>
<body>
<div class="box"></div>
<button class="stop">Stop</button>
<script>
(function(win, $){
$.setBaseFontSize(16);
$.animate($.query(".box")[0], {
width: 100,
height: 50,
opacity: 0
}, 500, function(){
var ani = $.animate($.query(".box")[0], {
width: 200,
height: 100,
opacity: 1
}, 1500, function(){
console.log("animate end")
});
$.query(".stop")[0]._on("click", function(e){
ani.delay(2000);
});
});
})(this, pTemplate);
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/ereddate2017/ptemplatejs.git
git@gitee.com:ereddate2017/ptemplatejs.git
ereddate2017
ptemplatejs
ptemplatejs
master

搜索帮助