<script src="1.js"></script> ? 引入軟件JQuery
<script>
function g(){
$(".a2").animate({"margin-top":"0"},3000,"linear", ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //使用了樣式a2的元素
function(){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //function() ? 代表完成之后執行 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?//animate ? 使用動畫效果 ?
$(".a2").css({"margin-top":"-80%" });g( ?) ?;}) ? }g(); ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?//margin-top ?代表位置
</script>
parsrInt ? ? ?去掉小數 ? ? i大寫
setInteval ? 定時器 ? ? ? ? ? ? ? ? ? ? ? ? ? ?setInteval(create,1000)
create ? ? 定時執行