最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

請(qǐng)問為什么我的頁面始終實(shí)現(xiàn)不了動(dòng)畫啊?

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>簡歷版本1</title>

<link rel="stylesheet" href="style.css">

? ? <link rel="stylesheet" href="pageA.css">

? ? <script type="text/javascript" src="Swipe.js"></script>

? ??

? ? <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>


</head>

<style type="text/css">

.charector{

position:absolute;

width:151px;

height:291px;

left: 6%;

top: 55%;

background:url(images/boy.png) 0px -291px no-repeat;

}

.slowWalk{

/*規(guī)定 @keyframes 動(dòng)畫的名稱。*/

? ? -webkit-animation-name: person-slow;/*規(guī)定動(dòng)畫完成一個(gè)周期所花費(fèi)的秒或毫秒。默認(rèn)是 0*/ ??

? ? -webkit-animation-duration: 950ms;/*規(guī)定動(dòng)畫被播放的次數(shù)。默認(rèn)是 1。 infinite(無限循環(huán)播放)*/ ?

? ? -webkit-animation-iteration-count: infinite;/*動(dòng)畫切換的方式是一幀一幀的改變*/ ?

? ? -webkit-animation-timing-function: steps(1, start);

? ? -moz-animation-name: person-slow;

? ? -moz-animation-duration: 950ms;

? ? -moz-animation-iteration-count: infinite;

? ? -moz-animation-timing-function: steps(1, start);

}

/*普通慢走*/

/*webkit是為了與chrome瀏覽器兼容*/

@-webkit-keyframes person-slow{

/*@keyframes規(guī)是創(chuàng)建動(dòng)畫。則內(nèi)指定一個(gè)CSS樣式和動(dòng)畫將逐步從目前樣式更改為新的樣式*/

0%{

background-position: 0px -291px;

}

25%{

background-position: -602px 0px;

}

50%{

background-position: -302px -291px;

}

75%{

background-position: -151px -291px;

}

100%{

background-position: 0px -291px;

}

}

/*moz是為了與火狐瀏覽器兼容*/

@-moz-keyframes person-slow{

0%{

background-position: 0px -291px;

}

25%{

background-position: -602px 0px;

}

50%{

background-position: -302px -291px;

}

75%{

background-position: -151px -291px;

}

100%{

background-position: 0px -291px;

}

}


</style>

<body>

?<div id='content'>

? ? ? ? <ul class='content-wrap'>

? ? ? ? ? ? <!-- 第一副畫面 -->

? ? ? ? ? ? <li>?

? ? ? ? ? ? <div class="a_background">

? ? ? ? ? ? ? ? ? ? <div class="a_background_top"></div>

? ? ? ? ? ? ? ? ? ? <div class="a_background_middle"></div>

? ? ? ? ? ? ? ? ? ? <div class="a_background_button"></div>

? ? ? ? ? ? ? ? </div>

? ? ? ? ? ? </li>

? ? ? ? ? ? <!-- 第二副畫面 -->

? ? ? ? ? ? <li> 頁面2 </li>

? ? ? ? ? ? <!-- 第三副畫面 -->

? ? ? ? ? ? <li> 頁面3 </li>

? ? ? ? </ul>

? ? ? ? <div id="boy" class="charector"></div>

? ? ? ? <div class="button">

? ? ? ? <button>點(diǎn)擊開始動(dòng)畫</button>

? ? ? ? </div>

? ? </div>

? ? <script type="text/javascript">

? ? ? ? var swipe = Swipe($("#content"));

//獲取數(shù)據(jù)

var getValue = function(className){

var $elem = $('' + className + '');

//走路的路線坐標(biāo)

return{

height:$elem.height(),

top:$elem.position().top

};

};

//路的Y軸

var pathY = function(){

var data = getValue('.a_background_middle');

return data.top + data.height / 2;

}();

$boy.css({

? ? ? ? ? ? top: pathY-boyHeight + 25

? ? ? ? });

// 修正小男孩的正確位置

? ? ? ? // 路的中間位置減去小孩的高度,25是一個(gè)修正值

//通過js動(dòng)態(tài)修正小男孩的TOP布局坐標(biāo)

//增加精靈動(dòng)畫

$('button').click(function(){

$boy.addClass('slowWalk');

});

</script>


</body>

</html>


正在回答

2 回答

你在頁面上單擊按鈕了么,沒看到按鈕的話 按f11 全屏顯示

0 回復(fù) 有任何疑惑可以回復(fù)我~

看看你的js加載路徑對(duì)不?

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

請(qǐng)問為什么我的頁面始終實(shí)現(xiàn)不了動(dòng)畫???

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)