01 2019 档案

摘要:添加浏览器前缀: -webkit- 也可用postCss自动添加 display:-webkit-flex; *如果用了弹性布局,子元素不需要浮动, -webkit-justify-content: 子元素水平排列方式方式。 center 水平居中 space-between 两端对齐 space- 阅读全文
posted @ 2019-01-30 11:45 阿|明 阅读(3405) 评论(0) 推荐(0)
摘要://判断安卓 和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 阿|明 阅读(195) 评论(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 阿|明 阅读(123) 评论(0) 推荐(0)
摘要:body,html{-webkit-overflow-scrolling:touch;} //针对ios设备 虚拟键盘上顶 留白问题 可用css样式解决 阅读全文
posted @ 2019-01-24 15:59 阿|明 阅读(1281) 评论(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 阿|明 阅读(838) 评论(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 阿|明 阅读(342) 评论(0) 推荐(0)
摘要:tachStart(item) //执行函数 function tachStart(target) { var time = null; target.addEventListener("touchstart",function(){ //手指触摸执行 time = setTimeout(handl 阅读全文
posted @ 2019-01-11 17:31 阿|明 阅读(356) 评论(0) 推荐(0)
摘要:arr.forEach() 遍历接收三个参数 arr.map(); "映射" arr.filter() 过滤 arr.find() 查找 找到符合条件元素后不再向下查找 every some 判断数组中内容是否符合条件返回true 或false every 判断关系&& 一个为假则返回false s 阅读全文
posted @ 2019-01-08 16:49 阿|明 阅读(492) 评论(0) 推荐(0)
摘要:显示页面加载百分比 阅读全文
posted @ 2019-01-02 12:00 阿|明 阅读(789) 评论(0) 推荐(0)