javascript个人函数库(beta版)
2010-07-30 16:58 BlueDream 阅读(2030) 评论(6) 编辑 收藏 举报^ _ ^ GameStart
DEMO源码
<input type="button" style="width:120px;height:45px;" id="run" value="演示"/>
<div id="container">
<div id="demo" class="demo">^ _ ^ GameStart</div>
</div>
<script type="text/javascript">
document.getElementById('run').onclick = function() {
Anim('demo', 'left:299px;border:1px solid #ff0000;opacity:0.3;filter:alpha(opacity=30)', {
duration: 500,
after: function() {
Anim('demo', 'background-color:#0033FF;top:199px;opacity:1;filter:alpha(opacity=100)', {
duration: 4000,
esing: Easing.bounce,
after: function() {
Anim('demo', 'background-color:#00CC00; left: 0px; border: 1px solid #990033;', {
duration: 1000,
after: function() {
Anim('demo', 'background-color:#FFCC33; top: 0px; border:1px solid #009933', {
duration: 1000,
easing: Easing.easeInStrong,
after: function() { document.getElementById('demo').innerHTML = '^ _ ^ GameOver'; }
});
}
});
}
});
}
});
}
</script>
<div id="container">
<div id="demo" class="demo">^ _ ^ GameStart</div>
</div>
<script type="text/javascript">
document.getElementById('run').onclick = function() {
Anim('demo', 'left:299px;border:1px solid #ff0000;opacity:0.3;filter:alpha(opacity=30)', {
duration: 500,
after: function() {
Anim('demo', 'background-color:#0033FF;top:199px;opacity:1;filter:alpha(opacity=100)', {
duration: 4000,
esing: Easing.bounce,
after: function() {
Anim('demo', 'background-color:#00CC00; left: 0px; border: 1px solid #990033;', {
duration: 1000,
after: function() {
Anim('demo', 'background-color:#FFCC33; top: 0px; border:1px solid #009933', {
duration: 1000,
easing: Easing.easeInStrong,
after: function() { document.getElementById('demo').innerHTML = '^ _ ^ GameOver'; }
});
}
});
}
});
}
});
}
</script>