10 2021 档案
微信浏览器打开H5页面右上角隐藏转发功能
摘要:js设置转发开关 document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() { WeixinJSBridge.call('hideOptionMenu'); }); 阅读全文
posted @ 2021-10-25 11:30 夜攸 阅读(327) 评论(0) 推荐(0)
纯css设置元素高度与宽度相等
摘要:设置图片高度等于宽度 .img-box{ width:100%; height:0; position: relative; padding-bottom: 100% } .img-box img{ width:100%; height:100%; position: absolute; } 如果仅 阅读全文
posted @ 2021-10-25 10:47 夜攸 阅读(1918) 评论(0) 推荐(0)
vue文件上传及压缩(canvas实现压缩)
摘要:// 读取文件结果 afterRead(files) { let that = this; let file = files.file; if (file undefined) { return; } if (file.size / 1024 > 1025) { // 文件大于1M(根据需求更改), 阅读全文
posted @ 2021-10-20 09:00 夜攸 阅读(1165) 评论(0) 推荐(0)