MD,这个问题折腾我了两个多小时,一直问题出在 element.children 不支持ie9 以下的浏览器,本地测试没问题是因为浏览器文档模式是标准,而发到测试环境,框架默认文档是模式是ie8 ,最后用find()替换了,真操...
vue-resource使用记录(模拟后台数据)
基于新版vue cli配置vue实现ajax获取后台数据是通过vue-resource,首先通过npm安装vue-resource安装完成以后,把vue-resource引入到main.js文件中src/main.js// The Vue build version to load with the `import`...
vue2.0自定义事件
我们知道父组件是使用props传递数据给子组件,如果子组件要把数据传递回去,怎么办? 那就是要自定义事件!使用v-on绑定自定义事件 每个Vue实例都实现了事件接口(Events interface), 即 使用$on(eventName) 监...
用 CSS 实现元素垂直居中,有哪些好的方案?
1.不知道自己高度和父容器高度的情况下, 利用绝对定位只需要以下三行:parentElement{ position:relative; } childElement{ position: absolute; top: 50%; transf...
[转载]入门Webpack,看这篇就够了
https://www.jianshu.com/p/42e11515c10f?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=weixin入门Webpack,看这篇就够了
移动端滚动穿透问题完美解决方案
问题 众所周知,移动端当有 fixed 遮罩背景和弹出层时,在屏幕上滑动能够滑动背景下面的内容,这就是臭名昭著的滚动穿透问题 之前搜索了一圈,找到下面两种方案 css 之 overflow: hidden SCSS .mo...
CSS实现单行、多行文本溢出显示省略号
单行:overflow: hidden; text-overflow:ellipsis; white-space: nowrap;多行:display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;多行及渐变:p{position: re...
多行滚动jQuery循环新闻列表代码
[ypbtn]http://pan.baidu.com/s/1i3KHLE9[/ypbtn]密码: yxnl
常用字体图标网址
位图图标库http://www.easyicon.net/http://www.iconpng.com/ 淘宝矢量图标库,首页就有图标制作及使用教程http://www.iconfont.cn/ 国外的一个矢量图标库http://fontello.com/
取消手机a响应区域的解决办法
取消手机a响应区域的解决办法a,input,button,select,textarea { -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-tap-highlight-color: transparent; }