摘要: //判断安卓 和ios (function(){ var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 var isiOS = !!u.... 阅读全文
posted @ 2019-01-28 12:05 阿|明 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 响应式布局可以用 min-width:370px; 屏幕宽度 > 370 以上执行 @media 中的样式 @media screen and (min-width:370px){ 填写代码 } max-width:370px; 屏幕宽度 < 370 以下执行 @media 中的样式 @media 阅读全文
posted @ 2019-01-25 11:23 阿|明 阅读(111) 评论(0) 推荐(0) 编辑
摘要: body,html{-webkit-overflow-scrolling:touch;} //针对ios设备 虚拟键盘上顶 留白问题 可用css样式解决 阅读全文
posted @ 2019-01-24 15:59 阿|明 阅读(1228) 评论(0) 推荐(0) 编辑
摘要: follow(item) function follow(target){ //定位自动偏移问题在target元素再套一个父元素可解决 var startx,starty,left_start,top_start,movex,movey,X,Y; var it = document.querySel 阅读全文
posted @ 2019-01-14 15:03 阿|明 阅读(824) 评论(0) 推荐(0) 编辑
摘要: tachMove(item) function tachMove(targer){ var startx,starty,X,Y; targer.addEventListener("touchstart",function(e){ //第一次触摸 startx = e.touches[0].pageX; starty = e.touches[0].p... 阅读全文
posted @ 2019-01-14 11:28 阿|明 阅读(332) 评论(0) 推荐(0) 编辑
摘要: tachStart(item) //执行函数 function tachStart(target) { var time = null; target.addEventListener("touchstart",function(){ //手指触摸执行 time = setTimeout(handl 阅读全文
posted @ 2019-01-11 17:31 阿|明 阅读(348) 评论(0) 推荐(0) 编辑
摘要: arr.forEach() 遍历接收三个参数 arr.map(); "映射" arr.filter() 过滤 arr.find() 查找 找到符合条件元素后不再向下查找 every some 判断数组中内容是否符合条件返回true 或false every 判断关系&& 一个为假则返回false s 阅读全文
posted @ 2019-01-08 16:49 阿|明 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 显示页面加载百分比 阅读全文
posted @ 2019-01-02 12:00 阿|明 阅读(754) 评论(0) 推荐(0) 编辑
摘要: <meta name="viewport" content="width=device-width"><style>*{padding: 0;margin:0;}#box{width:100%;height:200px;} #price{width:100%;height:200px;backgro 阅读全文
posted @ 2018-12-17 17:37 阿|明 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Obj.addEventListener("change",fun)function fun(){ if (this.files && this.files[0]){ var imgSrc=document.querySelector("类"); //获取图片展示节点 var reader = ne 阅读全文
posted @ 2018-12-14 17:18 阿|明 阅读(544) 评论(0) 推荐(0) 编辑