摘要: // 鼠标延时事件处理 (function($){ $.fn.hoverDelay = function(options){ var defaults = { hoverDuring: 200, outDuring: 200, hoverEvent: function(){ $.noop();... 阅读全文
posted @ 2018-12-24 11:05 吾生有涯,而知无涯! 阅读(340) 评论(0) 推荐(0) 编辑
摘要: function scrollIt(destination, duration = 200, easing = 'linear', callback) { const easings = { linear(t) { return t; }, easeInQuad(t) { return t * t; }, easeOutQuad... 阅读全文
posted @ 2018-12-04 17:42 吾生有涯,而知无涯! 阅读(455) 评论(0) 推荐(0) 编辑
摘要: function Countdown(seconds) { this._seconds = seconds; } Countdown.prototype._step = function() { console.log(this._seconds); if (this._seconds > 0) { 阅读全文
posted @ 2018-11-20 12:13 吾生有涯,而知无涯! 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 2、问题原因 效果使用css3动画制作,但是动画会导致页面抖动闪屏 3、解决方案 使用到动画的样式设置如下样式,可解决 eg: 阅读全文
posted @ 2018-10-31 17:47 吾生有涯,而知无涯! 阅读(4386) 评论(0) 推荐(0) 编辑
摘要: 为什么 执行typeof null时会返回字符串“object”? 原理是这样的。不同的对象在底层都表示为二进制,在javascript中二进制前三位都为0的话会被判断为object类型, null的二进制表示全0,自然前三位也是0,所以执行typeof时会返回“object” 阅读全文
posted @ 2018-09-07 14:07 吾生有涯,而知无涯! 阅读(1488) 评论(0) 推荐(0) 编辑
摘要: 一、安装相关依赖 二、在webpack.config.js里配置如下: new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", jquery: "jquery", "window.jQuery": "jquery" }) new webp 阅读全文
posted @ 2018-08-14 09:48 吾生有涯,而知无涯! 阅读(751) 评论(0) 推荐(0) 编辑
摘要: <div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:9999;width:100%;height:100%;display:none;"> <div id="innerdiv 阅读全文
posted @ 2018-08-03 10:06 吾生有涯,而知无涯! 阅读(793) 评论(0) 推荐(0) 编辑
摘要: https://juejin.im/entry/5b4802d15188251ac446d3a9?utm_source=gold_browser_extension 阅读全文
posted @ 2018-07-13 22:43 吾生有涯,而知无涯! 阅读(187) 评论(0) 推荐(0) 编辑
摘要: const formalLink = function(url) { var subStr = new RegExp('(http|https)://www.polyv.net/news/') return url.replace(subStr, ''); }; const formalLink = 阅读全文
posted @ 2018-07-05 08:52 吾生有涯,而知无涯! 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 在项目中。通过vue-cli 搭建的项目,npm run dev时,以绝对路径引用的相关资源在npm run build 后,页面打开报相关资源404错误; 解决方法如下: 打开build/utils.js,在图中相应位置加入红框内容,其中值可能会有不同,若不同,自己配置成相应的即可。 阅读全文
posted @ 2018-06-10 11:30 吾生有涯,而知无涯! 阅读(561) 评论(0) 推荐(0) 编辑