2017年12月20日

创建异步对象XHR的兼容写法、get、post上传数据的方式

摘要: 兼容ie7以下,创建异步对象的函数 javascript function creatXHR(){ if(typeof XMLHttpRequest != "undefined"){ return new XMLHttpRequest(); }else if(typeof ActiveXObject 阅读全文

posted @ 2017-12-20 23:00 ouruixi 阅读(379) 评论(0) 推荐(0)

swiper套路

摘要: swiper插件 quick start 基本结构 一般选项 方法 阅读全文

posted @ 2017-12-20 14:25 ouruixi 阅读(174) 评论(0) 推荐(0)

用opcity模拟zindex渐变的效果

摘要: github地址: https://github.com/echoorx/opacity Gradient zindex好像不能渐变改变,所以用opcity来模拟 阅读全文

posted @ 2017-12-20 13:36 ouruixi 阅读(214) 评论(0) 推荐(0)

pc端和移动端的轮播图实现(只是结构,内容以后慢慢补充)

摘要: 轮播图 PC端 移动端 1. 原生js的写法 图片顺序 8123456781 1. 设置计时器 2. 当过度完成之后判断index是否到达两边界限,是的话设置位移 3. 手指touchstart时,获取位置,暂停计时器 4. 手指touchmove时,计算滑动距离,图片跟着位移 5. 手指touch 阅读全文

posted @ 2017-12-20 12:40 ouruixi 阅读(736) 评论(0) 推荐(0)

关于iscroll.js插件的使用

摘要: iscroll 作用: 可以让区域滚动效果好看一些 使用: 1. html结构 外面必须包一层盒子,切内部的元素要尽量简单,不然会影响滚动效果 注意: 1. wrapper里面只有第一个ul能被实例化 2. 动态创建dom元素的时候,需要在创建之前实例化,myscroll.refresh();//当 阅读全文

posted @ 2017-12-20 11:16 ouruixi 阅读(224) 评论(0) 推荐(0)

导航