2018年6月14日
摘要: 给元素添加display: flex;属性 垂直居中 align-items:center; 水平居中 justify-content:center; 阅读全文
posted @ 2018-06-14 11:27 BlindingSunlight 阅读(151) 评论(0) 推荐(0) 编辑
  2018年6月13日
摘要: Transition作用是指定了某一个属性(如width、left、transform等)在两个值之间如何过渡,他包括transition-property、transition-duration、transition-timing-function、transition-delay等。如果某一个元 阅读全文
posted @ 2018-06-13 16:18 BlindingSunlight 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 出现404的根本原因是因为 vue-router 的路径不是真实的路径,而是通过 js 渲染的。页面刷新向服务端请求的时候js 还没有开始处理。 解决方法: 1.由后台解决,后台在服务端添加配置,检测到404页面,直接跳转指向到 index.html 的 路径 2.由前端解决,不采用 mode:"h 阅读全文
posted @ 2018-06-13 10:47 BlindingSunlight 阅读(295) 评论(0) 推荐(0) 编辑
  2018年6月7日
摘要: get 请求 axios.get('/user', { params: { ID: 12345 } }) .then(function (response) { console.log(response); }) .catch(function (response) { console.log(re 阅读全文
posted @ 2018-06-07 16:26 BlindingSunlight 阅读(159) 评论(0) 推荐(0) 编辑
摘要: qs是一个npm仓库所管理的包,可通过npm install qs命令进行安装. 1. qs.parse()将URL解析成对象的形式 2. qs.stringify()将对象 序列化成URL的形式,以&进行拼接 qs.stringify() 和JSON.stringify()有什么区别 var a 阅读全文
posted @ 2018-06-07 16:19 BlindingSunlight 阅读(9363) 评论(0) 推荐(0) 编辑
摘要: parent() 方法返回被选元素的直接父元素。 DOM 树:该方法只沿着 DOM 树向上遍历单一层级。如需向上遍历直至文档根元素的所有路径(返回祖父节点或其他祖先),请使用 parents()。 parents()从父元素开始沿 DOM 树向上遍历,并返回匹配所传递的表达式的所有祖先返回包含零个、 阅读全文
posted @ 2018-06-07 16:11 BlindingSunlight 阅读(126) 评论(0) 推荐(0) 编辑
  2016年11月19日
摘要: <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>jQuery动画</title> <style type="text/css">#btn{ width: 100px; text-align: center; height: 30p 阅读全文
posted @ 2016-11-19 16:17 BlindingSunlight 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 滚轮事件封装的优化,更符合面向对象思想.跟js原生保持一致写法 // 鼠标滚轮滚 Object.prototype.onmousewheelhandle =function(handle){ var info = navigator.userAgent; var down = null; if(in 阅读全文
posted @ 2016-11-19 16:15 BlindingSunlight 阅读(243) 评论(0) 推荐(0) 编辑
  2016年11月5日
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>图片延迟加载</title> <style type="text/css"> *{ margin: 0; padding: 0; } img{ width: 300px; heig 阅读全文
posted @ 2016-11-05 20:33 BlindingSunlight 阅读(153) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>瀑布流</title> <style type="text/css"> *{margin: 0;padding: 0;} #wrap{width: 900px;margin: 0 阅读全文
posted @ 2016-11-05 20:32 BlindingSunlight 阅读(888) 评论(1) 推荐(1) 编辑