課程
/前端開發(fā)
/JavaScript
/H5+JS+CSS3 實(shí)現(xiàn)圣誕情緣
按照上面的代碼,但是飛不走啊~ 你們都是怎么處理的?
2016-03-03
源自:H5+JS+CSS3 實(shí)現(xiàn)圣誕情緣 3-4
正在回答
$("button").on("click",function(){ ????/** ?????*?通過transition的方式改變運(yùn)動(dòng) ?????*/ ????$(".bird").transition({ ????????'right':?'3em', ????},?1000,?'linear',function(){ ????????alert("end")???? ????}) })
<canvas id="cvs" height="400"></canvas>
? ? <script type="text/javascript">
? ? ?//第一步:獲取canvas元素
? ? var cvs = document.getElementById('cvs'); //畫布
? ? ?//第二步:獲取上下文
? ? var ctx = cvs.getContext('2d'); // 畫筆
? ? //第三步:指定繪制線樣式、顏色
? ? ctx.strokeStyle = "red";
? ? //第四步:繪制矩形,只有線。內(nèi)容是空的
? ? ctx.strokeRect(10, 10, 190, 100);
? ? //以下演示填充矩形。
? ? ctx.fillStyle="blue";
? ? ctx.fillRect(110,120,100,100);
? ??
? ? </script>
舉報(bào)
為圣誕節(jié)準(zhǔn)備的H5+JS+CSS特效案例教程,實(shí)現(xiàn)靜與動(dòng)的結(jié)合
1 回答鳥飛不走啊
1 回答按照答案寫的,鳥還是不動(dòng)呢?
3 回答鳥不飛的解決辦法
2 回答背景圖片按照老師的方法不能自適應(yīng)
1 回答怎樣實(shí)現(xiàn)來回飛
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-05-17
2016-03-04
<canvas id="cvs" height="400"></canvas>
? ? <script type="text/javascript">
? ? ?//第一步:獲取canvas元素
? ? var cvs = document.getElementById('cvs'); //畫布
? ? ?//第二步:獲取上下文
? ? var ctx = cvs.getContext('2d'); // 畫筆
? ? //第三步:指定繪制線樣式、顏色
? ? ctx.strokeStyle = "red";
? ? //第四步:繪制矩形,只有線。內(nèi)容是空的
? ? ctx.strokeRect(10, 10, 190, 100);
? ? //以下演示填充矩形。
? ? ctx.fillStyle="blue";
? ? ctx.fillRect(110,120,100,100);
? ??
? ? </script>