淺談canvas


<html>
<style>
body {background :black}
#c1 {background :white}
</style>
<script>
window.onload = function(){
var oC = document.getElementById('c1');
var oGC  = oC.getContext('2d');

oGC.fillRect(0,0,100,100);

oGC.fillStyle = 'red';

oGC.fillRect(50,50,100,100);
};
</script>
<body>


<canvas id="c1" width = "400" height = "400"><canvas>


</body>
</html>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章