前段时间由于项目需要,用到了HTML5 Canvas画图,但是没有画虚线的方法,自己写了一个HTML5 画虚线的组件. dashedLine.js if (window.CanvasRenderingContext2D && CanvasRenderingContext2D.prototype.lineTo) { CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, dashArray) { if (…
Applied Visual Design: Create a Gradual CSS Linear Gradient background: linear-gradient(gradient_direction, color 1, color 2, color 3, ...) The first argument specifies the direction from which color transition starts - it can be stated as a degree…