摘要:
因为banner图是动态创建的,在插件开始初始化时,文档流中没用图片,故没有创建相应宽度,通过调整js加载顺序,问题还是没有解决。最后找到swiper插件 api 有属性是可以根据内容变动,自动初始化插件的,添加observer:true后问题解决! ... 阅读全文
摘要:
function timeago(dateTimeStamp){ // dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。 var minut... 阅读全文
摘要:
var xxx = document.getElementById('输入框id');setInterval(function(){ xxx.scrollIntoView(false);},200)Element.scrollIntoView()说是还在试验... 阅读全文
摘要:
if(document.getElementById("id")){ alert('对象存在'); ... ...}else{ alert('对象不存在'); ... ...} 参考传送门:https://segmentfault.co... 阅读全文
摘要:
参考:http://blog.csdn.net/qq_26819733/article/details/55549241?locationNum=11&fps=1当github上下载别人的vue项目时候,在npm install 时候报错,亲测已解决npm i... 阅读全文
摘要:
justify-content:center;//子元素水平居中align-items:center;//子元素垂直居中display:-webkit-flex;在父级元素上面加上上面3句话,就可以实现子元素水平垂直居中。 阅读全文
摘要:
安装 npm install -g rimraf 使用 cd xxx[include node_modules folder]rimraf node_modules参考:http://blog.csdn.net/crper/article/detail... 阅读全文
摘要:
var startx, starty; //获得角度 function getAngle(angx, angy) { return Math.atan2(angy, angx) * 180 / Math.PI; }; /... 阅读全文
摘要:
删除 账户目录下的.npmrc文件就行了(例:我的目录:C:\Users\Administrator),在C盘搜索.npmrc 然后删除, https://www.oschina.net/question/570769_88967 ... 阅读全文
摘要:
windows 按照这个网站一步一步来就行,: http://www.ps265.com/ps/photoshop-cs3-cs5-cs6-5.html 阅读全文