鲜荣彬
Herry
03 2017 档案
canvas(五)createPattern
摘要:/** * Created by xianrongbin on 2017/3/9. * 图片填充 */ var dom = document.getElementById('clock'), ctx = dom.getContext('2d'), cirucle = Math.PI; var bgImage=new Image(); bgImage.src='bk.jp... 阅读全文
posted @ 2017-03-31 22:25 Herry彬 阅读(1216) 评论(0) 推荐(1)
canvas(四) Gradient- demo
摘要:/** * Created by xianrongbin on 2017/3/9. */ /* strokeStyle 或 fillStyle 属性的值*/ /** * Demo1 创建线性渐变 */ var dom = document.getElementById('clock'), ctx = dom.getContext('2d'); var linearGra... 阅读全文
posted @ 2017-03-22 22:14 Herry彬 阅读(192) 评论(0) 推荐(0)
canvas(三) star- demo
摘要:/** * Created by xianrongbin on 2017/3/8. * 本例子使用渐变画出 璀璨星空 */ var dom = document.getElementById('clock'), ctx = dom.getContext('2d'), cirucle = Math.PI; //ctx.lineJoin='miter'; //round 圆... 阅读全文
posted @ 2017-03-11 21:58 Herry彬 阅读(291) 评论(0) 推荐(1)
canvas(一) 基本线条绘制
摘要:var dom = document.getElementById('canvasItem'), ctx = dom.getContext('2d'); //坐标位置默认基于 浏览器窗口(0,0),此时居中,基于 当前坐标系 //x轴 向右,y轴向下 ctx.beginPath(); ctx.moveTo(100,350); //只是将坐标移到某点 ... 阅读全文
posted @ 2017-03-08 22:52 Herry彬 阅读(525) 评论(0) 推荐(0)
webpack(四)处理 css\less\sass 样式
摘要:(一) 处理普通的.css 文件,需要安装 css-loader,style-loader .less 文件,需要安装 less-loader .sass 文件,需安装 less-loader (二) 在项目中,我们会遇到 不同浏览器,前缀不同。比如 display: flex ,在IE以及谷歌下前 阅读全文
posted @ 2017-03-01 23:07 Herry彬 阅读(8855) 评论(2) 推荐(1)
webpack(三)使用 babel-loader 转换 ES6代码
摘要:查询各个 loader的使用,可以在官网上查询。 https://www.npmjs.com (一)安装 babel-loader,babel-core。 使用命令 因为ES6语法每年都在更新,因此,我们需要一定的规则去转换。 (二) 首先按照如下层级建立相应文件 将测试用的ES6代码放在 app. 阅读全文
posted @ 2017-03-01 22:28 Herry彬 阅读(9448) 评论(5) 推荐(2)