摘要: <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2021-11-23 16:36 甜土豆 阅读(3108) 评论(0) 推荐(0) 编辑
摘要: getSixMonths(new Date(), 4) // date日期对象,num几个月 function getSixMonths(date, num) { let year = date.getFullYear() let month = date.getMonth() + 1 this.t 阅读全文
posted @ 2021-08-11 14:58 甜土豆 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 效果图 直接放代码 class DateUtil { constructor() { this.now = new Date(); // 当前日期 this.nowDayOfWeek = this.now.getDay(); // 今天本周的第几天 this.nowDay = this.now.ge 阅读全文
posted @ 2021-08-11 14:35 甜土豆 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 数据可是化地图大屏项目 外卖网热力图 商品订单统计图 源码地址 qq975619483 阅读全文
posted @ 2021-07-26 14:46 甜土豆 阅读(1254) 评论(0) 推荐(0) 编辑
摘要: audio 是H5的新标签 常用的属性有 src 资源 autoplay 自动播放 controls 显示默认控件 loop 循环播放 muted 静音 preload 规定当网页加载时,音频是否默认被加载以及如何被加载。 auto metadata none controls控件中每个小控件的显示 阅读全文
posted @ 2021-06-25 15:40 甜土豆 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 直接放代码是最好的方式 !function(e, t, a) { function r() { for (var e = 0; e < s.length; e++) { s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : 阅读全文
posted @ 2021-04-28 18:59 甜土豆 阅读(66) 评论(0) 推荐(0) 编辑
摘要: nvm是什么 nvm是node版本管理工具,可以切换node版本,在开发前端老项目时非常实用 nvm安装 下载地址 https://github.com/coreybutler/nvm-windows/releases 推荐.exe方式安装,直接下一步下一步 nvm-setup.zip 安装完成之后 阅读全文
posted @ 2021-04-28 16:52 甜土豆 阅读(682) 评论(0) 推荐(0) 编辑
摘要: 用vue的方式实现H5页面倒计时功能 时间分为 小时、分钟、秒、值,可以直接复制使用,传入时间大小即可使用。 <div id="app"> {{ message }} <br> <div class="time"> <span>{{hour}}</span> <span>{{minute}}</sp 阅读全文
posted @ 2021-03-26 18:41 甜土豆 阅读(9029) 评论(0) 推荐(0) 编辑
摘要: 小程序使用canvas画图保存至手机相册 在使用canvas绘制海报的过程中不建议使用原生来进行画图,因为默认是不支持rpx像素的,px不会做到自适应。 推荐使用插件 Painter github地址 https://github.com/Kujiale Mobile/Painter 配置很简单,也 阅读全文
posted @ 2019-07-12 17:14 甜土豆 阅读(825) 评论(0) 推荐(0) 编辑
摘要: object-fit属性有哪些值呢? object-fit: fill; object-fit: contain; object-fit: cover; object-fit: none; object-fit: scale-down; fill: 中文释义“填充”。默认值。替换内容拉伸填满整个co 阅读全文
posted @ 2019-07-12 16:49 甜土豆 阅读(1321) 评论(0) 推荐(0) 编辑