摘要: body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padd 阅读全文
posted @ 2021-08-23 12:33 笨鸟不会飞~~ 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 起因:为了便于前端进行测试,有时需要进行本地代理; 本地代理与反向代理是冲突的,若要同时使用本地代理和反向代理,需要进行以下配置: 在build文件夹下的webpack-dev-conf.js文件中配置 1)在const portfinder = require('portfinder')后面添加下 阅读全文
posted @ 2020-03-23 23:09 笨鸟不会飞~~ 阅读(624) 评论(0) 推荐(0) 编辑
摘要: String 类型提供了很多方法,用于辅助完成对ECMAScript 中字符串的解析和操作。 1、字符方法 1)charAt() 2)charCodeAt() 3)方括号+数字 <script> //charAt() 输出索引号对应的单个字符 //charCodeAt() 输出索引号对应的单个字符的 阅读全文
posted @ 2020-03-19 17:34 笨鸟不会飞~~ 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 在做移动端底部导航时,鼠标双击各个选项会报如下错误,但是单击时不会出现任何问题。 出现这个bug的原因就是vue-router版本问题,vue-router 3.0版本以上的回调形式是promise api的形式,返回的是一个promise,如果没有捕获到错误,控制台始终会出现上图的警告; 解决方法 阅读全文
posted @ 2020-03-18 22:46 笨鸟不会飞~~ 阅读(363) 评论(0) 推荐(0) 编辑
摘要: LESS1、注释// 不会被编译/**/ 会被编译 2、变量 @bgColor:yellow; .border{ border:2px solid pink; } h1{ width:80%; height:60px; .border; color: #000; background:@bgColo 阅读全文
posted @ 2020-03-13 22:48 笨鸟不会飞~~ 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 参考代码如下: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>个性化滚动条</title> 6 <style> 7 div{ 8 width:600px; 9 height:300px; 阅读全文
posted @ 2020-03-10 13:23 笨鸟不会飞~~ 阅读(1548) 评论(0) 推荐(0) 编辑
摘要: 1、下载“A File Icon”插件 github地址:https://github.com/SublimeText/AFileIcon 方法:git clone https://github.com/SublimeText/AFileIcon 下载到本地计算机 2、将下载完成的插件复制到Subl 阅读全文
posted @ 2020-03-09 00:04 笨鸟不会飞~~ 阅读(1077) 评论(0) 推荐(0) 编辑
摘要: Swiper插件可用于PC端和移动端;是开源、免费、强大的触摸滑动插件。下面主要介绍其基本用法: 1.首先加载插件,需要用到的文件有swiper.min.js和swiper.min.css文件(可以在官网下载、CDN或者npm、yarn安装等) 1 <!DOCTYPE html> 2 <html l 阅读全文
posted @ 2020-03-08 10:02 笨鸟不会飞~~ 阅读(3968) 评论(0) 推荐(0) 编辑
摘要: 1 /* 为了不污染全局变量使用闭包 2 实现思路:直接清除全部div的class,然后只给当前被点击的div加上class 3 */ 4 (function(){ 5 var menu = document.getElementById('menu'); 6 var divs = menu.get 阅读全文
posted @ 2020-03-07 23:02 笨鸟不会飞~~ 阅读(3252) 评论(0) 推荐(0) 编辑
摘要: Uncaught TypeError: (intermediate value) is not a function. 出现这种bug的原因:在你的代码中,同时定义了变量、匿名函数或者闭包函数,并且该变量定义在了这两类函数之前,如果变量后面省略了分号,js就会自动解析为匿名函数进行自调,会被认为是变 阅读全文
posted @ 2020-03-07 22:54 笨鸟不会飞~~ 阅读(13249) 评论(0) 推荐(3) 编辑