摘要: let isHanZi = /[\u4E00-\u9FA5]/g.test('你好'); console.log(isHanZi); // true 阅读全文
posted @ 2021-01-29 09:50 青云码上 阅读(92) 评论(0) 推荐(0) 编辑
摘要: . /** * @param {fn} * @param {time} 时间间隔ms * @param {isRun} 是否立即执行:true false * @return {*} */ /** * 防抖 */ function fangDou(fn, time, isRun){ let time 阅读全文
posted @ 2021-01-18 14:50 青云码上 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 使用 toLocaleString() 方法: let num=9472834728374; console.log(num.toLocaleString()); // 9,472,834,728,374 阅读全文
posted @ 2021-01-15 13:26 青云码上 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 主要知识点:wx-open-launch-weapp 首先获取微信签名 wx.config({ debug: true, appId: res.appId, // 必填,公众号的唯一标识 timestamp: res.timestamp, // 必填,生成签名的时间戳 nonceStr: res.n 阅读全文
posted @ 2021-01-14 10:50 青云码上 阅读(515) 评论(0) 推荐(0) 编辑
摘要: <script> document.body.style.setProperty('--main-color', '#0f0'); </script> .box{ width: 100px; height: 100px; background: var(--main-color); } 修改主题色只 阅读全文
posted @ 2021-01-14 10:38 青云码上 阅读(603) 评论(0) 推荐(0) 编辑
摘要: yarn add mobile-detect -S import MobileDetect from 'mobile-detect' // alert("进来了") var userAgent = navigator.userAgent;//获取userAgent信息 console.log(use 阅读全文
posted @ 2021-01-14 10:16 青云码上 阅读(2774) 评论(1) 推荐(0) 编辑
摘要: env()和constant(),是IOS11新增特性,Webkit的css函数,用于设定安全区域与边界的距离,有4个预定义变量: safe-area-inset-left:安全区域距离左边边界的距离 safe-area-inset-right:安全区域距离右边边界的距离 safe-area-ins 阅读全文
posted @ 2020-11-16 10:24 青云码上 阅读(18085) 评论(0) 推荐(2) 编辑
摘要: byte:字节 bit:: 位 bit 是 电脑记忆体中最小的单位,在二进位电脑系统中,每一bit 可以代表0 或 1 的数位讯号。 一个byte由8 bit 所组成,可代表一个字元(A~Z)、数字(0~9)、或符号(,.?!%&+-*/),是记忆体储存资料的基本单位; 1 byte = 8 bit 阅读全文
posted @ 2020-11-11 16:30 青云码上 阅读(746) 评论(0) 推荐(0) 编辑
摘要: <svg width="100%" height="100"> <text text-anchor="middle" x="50%" y="50%" class="text text-1"> 你好,打工人 </text> <text text-anchor="middle" x="50%" y="5 阅读全文
posted @ 2020-10-30 17:33 青云码上 阅读(182) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>test</title> </head 阅读全文
posted @ 2020-06-16 14:27 青云码上 阅读(374) 评论(0) 推荐(0) 编辑