看到這里,我又瞄了一眼課程大綱,猛然發(fā)現(xiàn)后面居然沒有視頻了。。。。,oh! my god!亦步亦趨的學習方式不行了,只能好好學完老師的技巧,然后自己想辦法。
2016-12-20
<canvas id="cvs" width="500" height="500"></canvas>
<script>
var cvs = document.getElementById('cvs');
var ctx = cvs.getContext('2d');
ctx.strokeStyle = "red";
ctx.strokeRect(10, 10, 190, 100);
ctx.fillStyle = "blue";
ctx.fillRect(50,10,100,100);
</script>
<script>
var cvs = document.getElementById('cvs');
var ctx = cvs.getContext('2d');
ctx.strokeStyle = "red";
ctx.strokeRect(10, 10, 190, 100);
ctx.fillStyle = "blue";
ctx.fillRect(50,10,100,100);
</script>
2016-12-15
carousel.run(i);
傳入的參數(shù)值可以決定3D旋轉圖的deg,具體看看run()的方法就明白了,懂了套路就可以自己寫各種參數(shù);
如果不太懂將代碼封裝到js的意義,可以打開F12看看代碼結構,將代碼寫到html里面,樣式寫到css里,然后隱藏,js用來做簡單的出現(xiàn)、旋轉和隱藏操作
傳入的參數(shù)值可以決定3D旋轉圖的deg,具體看看run()的方法就明白了,懂了套路就可以自己寫各種參數(shù);
如果不太懂將代碼封裝到js的意義,可以打開F12看看代碼結構,將代碼寫到html里面,樣式寫到css里,然后隱藏,js用來做簡單的出現(xiàn)、旋轉和隱藏操作
2016-12-09