12 2021 档案

摘要:实现效果 效果一: 效果二: 实现思路 canvas实现 1. 绘制三角形 // html <canvas id="triangle" width="30" height="30"> Your browser does not support the canvas element. </canvas 阅读全文
posted @ 2021-12-24 17:20 shellon 阅读(616) 评论(0) 推荐(0)
摘要:方法一 使用ES的最新语法:Array.prototype.flat()。 flat([dept]),参数 dept 为数组的深度,默认为1,根据传入的深度将数组展开。 对于不确定深度的数组,可以传入 Infinity (代表正无穷大)。 【示例】 【优点】 使用简单 【缺点】 有兼容性性问题,具体 阅读全文
posted @ 2021-12-02 11:22 shellon 阅读(1811) 评论(0) 推荐(0)