- 博客(4)
- 收藏
- 关注
原创 去抖动函数
封装的去抖动函数: //防抖函数 let timeout = null function debounce(fn, wait) { if(timeout !== null) clearTimeout(timeout) timeout = setTimeout(fn, wait) } export default debounce 页面使用: debounce(() => { //在这里写你的方法 },500) 之前看别的前辈写的,忘记哪里看的了,这次保存一下,供以后学...
2021-05-18 18:49:24
457
转载 2020-12-14
/*将滚动条设置为透明*/ ::-webkit-scrollbar{ width:0; height:0; color:transparent; }
2020-12-14 20:49:54
90
转载 H5判断手机系统是安卓还是ios
var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 alert('是否是Android:'+isAndroid); alert('.
2020-09-10 11:47:42
1315
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人