代码拉取完成,页面将自动刷新
<!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>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。