添加天空渐变 The current browser does not support Canvas, can replace the browser a try! window.onload = function(){ var canvas = document.getElementById('canvas'); canvas.width = 1200; canvas.height = 800; if(canvas.getContext('2d')){ var context = canvas.getContext('2d'); // context.fillStyle = "#000"; var skyStyle = context.createLinearGradient(0,0,0,canvas.height); skyStyle.addColorStop(0.0,'black'); skyStyle.addColorStop(1.0,'#035'); context.fillStyle = skyStyle; context.fillRect(0,0,canvas.width,canvas.height) for(var i=0;i /*图形变换 位移 translate(x,y) 旋转 rotate(deg) 缩放 scale(sx,sy) */
查看更多关于canvas-star3_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did109997