04 2017 档案
摘要:/** * 图片绕边旋转的小动画 */ function initDemo10() { var canvas = document.getElementById("demo10"); if (!canvas) { return; } var context = canvas.getContext("2d"); var img = new...
阅读全文
摘要:/** * 剪切图像 */ function initDemo8(){ var canvas = document.getElementById("demo8"); if (!canvas) return; var context = canvas.getContext("2d"); var img = new Image(); img.src = "...
阅读全文
摘要:/** * 图片平铺 */ function initDemo7(){ var canvas = document.getElementById("demo7"); if (!canvas) return; var context = canvas.getContext("2d"); var type = [ "no-repeat", // 不...
阅读全文
摘要:/** * 图形绘制阴影 */ function initDemo6() { var canvas = document.getElementById("demo6"); if (!canvas) return; var context = canvas.getContext("2d"); context.fillStyle = "#02c9e5"; ...
阅读全文
摘要:/** * 图形组合 */ function initDemo5() { var canvas = document.getElementById("demo5"); if (!canvas) return; var context = canvas.getContext("2d"); var oprtns = [ "source-atop",...
阅读全文
摘要:1 function GetQueryString(name) { 2 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"); 3 var r = window.location.search.substr(1).match(reg); 4 if (r!=null) return (r[2]); return nu...
阅读全文