1 Star 0 Fork 0

zhengchen/avalon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mmAnimate.html 3.11 KB
一键复制 编辑 原始数据 按行查看 历史
qincheng 提交于 2014-01-03 11:05 . update mmAnimate
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="avalon.js"></script>
<script src="http://apycom.com/ssc-data/themes/default/scripts/jquery.js" language="javascript"></script>
<script>
require("mmAnimate,ready!", function() {
var el = document.getElementById("test")
el.onclick = function() {
switch (el.innerHTML) {
case "resize":
avalon(el).fx({
width: 400,
height: 400,
background:"green"
}, 1200, function() {
avalon.log("complete")
el.innerHTML = "translation"
})
break;
case "translation":
avalon(el).fx({
top: 300,
left: 300,
width: 100,
height: 100
}, 1000, function() {
avalon.log("complete")
this.style.top = "40px"
this.style.left = "40px"
el.innerHTML = "toggle"
})
break
case "toggle":
avalon(el).hide(1000, function() {
avalon(el).show(1000, function() {
avalon.log("complete")
el.innerHTML = "fade"
})
})
break
case "fade":
avalon(el).fadeOut(1000, function() {
avalon(el).fadeIn(1000, function() {
avalon.log("complete")
el.innerHTML = "slide"
})
})
break;
case "slide":
avalon(el).slideUp(1000, function() {
avalon(el).slideDown(1000, function() {
avalon.log("complete")
el.innerHTML = "slideDown"
})
})
break;
}
}
})
</script>
<style>
#test{
width:200px;
height:200px;
background: red;
position: absolute;
}
</style>
</head>
<body>
<div ms-controller="animate">
<div id="test">resize</div>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cowboy13/avalon.git
git@gitee.com:cowboy13/avalon.git
cowboy13
avalon
avalon
master

搜索帮助