第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

運(yùn)行不粗來(lái)??

<!DOCTYPE html>
<html>
??? <head>
??????? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
??????? <title>jQuery動(dòng)畫(huà)特效</title>
??????? <style type="text/css">
??????????? div{
??????????????? width:100px;
??????????????? height:100px;
??????????????? border:red solid 2px;
??????????????? background-color:green;
??????????????? position:absolute;
??????????????? margin:10px 200px;
??????????????? }
??????? </style>
??? </head>
?? ?
??? <body>
??? <div id="box"></div>
?? ?
??? <input type="button"? id="zuo" value="左移"/>
??? <input type="button"? id="you" value="右移"/>
??? <script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.js">
??????? $(function(){
??????????? $("#zuo").bind("click",function(){
??????????????? $("#box").animate(? {left: "+=100px"},2000)
??????????? })
??????????? $("#you").bind("click",function(){
??????????????? $("#box").animate(? {left: "-=100px"},2000)
??????????? })
??????? })
??? </script>
??? </body>
</html>

-------------------------------------------------------------------------------------------------

我的代碼,怎么沒(méi)效果呢?

正在回答

2 回答

<!DOCTYPE html>

<html>

? ? <head>

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

? ? ? ? <title>jQuery動(dòng)畫(huà)特效</title>

? ? ? ? <style type="text/css">

? ? ? ? ? ? div{

? ? ? ? ? ? ? ? width:100px;

? ? ? ? ? ? ? ? height:100px;

? ? ? ? ? ? ? ? border:red solid 2px;

? ? ? ? ? ? ? ? background-color:green;

? ? ? ? ? ? ? ? position:absolute;

? ? ? ? ? ? ? ? margin:10px 200px;

? ? ? ? ? ? ? ? }

? ? ? ? </style>

? ? </head>

? ??

? ? <body>

? ? <div id="box"></div>

? ??

? ? <input type="button" ?id="zuo" value="左移"/>

? ? <input type="button" ?id="you" value="右移"/>

? ? <script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>//這是引入的腳本,不能在這里面編寫(xiě)代碼

? ? <script>

? ? ? ? $(function(){

? ? ? ? ? ? $("#zuo").bind("click",function(){

? ? ? ? ? ? ? ? $("#box").animate({left:"100px"},2000)

? ? ? ? ? ? })

? ? ? ? ? ? $("#you").bind("click",function(){

? ? ? ? ? ? ? ? $("#box").animate({left:"100px"},2000)

? ? ? ? ? ? })

? ? ? ? })

? ? </script>

? ? </body>

</html>


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

Dream0703 提問(wèn)者

非常感謝!
2016-05-19 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕絲3843690 回復(fù) Dream0703 提問(wèn)者

他這個(gè)不對(duì)吧,他這樣是一下子就跳到了100px,然后又繼續(xù)移。有BUG
2016-06-23 回復(fù) 有任何疑惑可以回復(fù)我~

加載jQuuery應(yīng)該放在<head/>里面,

<head><script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script</head>

,還有你左移是“-=”,右移是“+=”才對(duì)

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

舉報(bào)

0/150
提交
取消
jQuery基礎(chǔ)課程
  • 參與學(xué)習(xí)       154724    人
  • 解答問(wèn)題       7289    個(gè)

加入課程學(xué)習(xí),有效提高前端開(kāi)發(fā)速度

進(jìn)入課程

運(yùn)行不粗來(lái)??

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

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

幫助反饋 APP下載

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

公眾號(hào)

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