- 博客(24)
- 收藏
- 关注
转载 小测试
let a = nulllet b = undefinedlet c = 0let d = {}console.log(typeof a, !a, a !==undefined, a !== 0)console.log(typeof b, !b, b !== undefined, b...
2018-06-04 17:53:00
119
转载 常用正则
https://www.jianshu.com/p/e7bb97218946 转载于:https://my.oschina.net/xuexipython/blog/1823933...
2018-06-04 16:19:00
128
转载 获取Url参数
function getQueryString(name) { let reg = `(^|&)${name}=([^&]*)(&|$)` let r = window.location.search.substr(1).match(reg); if (r ...
2018-06-01 14:31:00
133
转载 webp 图片的浏览器兼容检测
function checkWebp() { try{ return (document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') == 0); }cat...
2018-04-17 10:18:00
435
转载 滚动条简单更改
.text-wrap{ margin-top: 16px; font-size: 14px; line-height: 1.4; color: #666666; max-height: 80px; overflow-y: scroll;}.text-wrap::-w...
2018-04-13 09:48:00
114
转载 cookie设置
setCookie (cname, cvalue, exdays) { let d = new Date() d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)) let expires = 'expires=' + d.t...
2018-02-07 17:33:00
136
转载 vue键盘绑定到document
created() { document.onkeydown = (ev) => { if (ev.key === 'Enter') { // your code } }} ...
2017-11-27 11:29:00
458
转载 vue中引入第三方js
vue中常遇到第三方js,简单粗暴的可以直接在html页面中引入cdn。 或者在 webpack.base.conf.js 中进行配置。 module.exports = { entry: { track: './src/utils/face/tracking-min.js',...
2017-11-02 11:43:00
332
转载 vue文件打包顺序
new HtmlWebpackPlugin({ filename: config.build.index, template: 'index.html', inject: true, minify: { removeComments: true, collaps...
2017-11-02 11:32:00
300
转载 es6学习笔记
1、解构赋值 数组的解构赋值 let [, , c] = [1, 2, 3]console.log(c) // 3 let [x] = []console.log(x) // undefined let [y = 1] = []console.log(y) // 1 可以设...
2017-06-29 10:43:00
91
转载 原生替代jquery方案
Query Selector 常用的 class、id、属性 选择器都可以使用document.querySelector或document.querySelectorAll替代。区别是 document.querySelector返回第一个匹配的 Element d...
2017-06-26 17:17:00
931
转载 float元素居中
<style type="text/css"> .con { position: relative; float: left; left: 50%; background: lightblue; } ...
2017-06-19 11:29:00
110
转载 vue中将网页打印成pdf
<template><div class="pdf-wrap" id="pdfWrap"> <button v-on:click="getPdf">点击下载PDF</button> <div class="pdf-dom" id=...
2017-06-15 14:29:00
693
转载 vue-echarts 地图map 尝试
<template> <chart :options="option"></chart></template><style scoped>.echarts{ width: 100%; height: 100%;...
2017-06-15 14:16:00
285
转载 echarts 折线图背景色渐变
itemStyle: { borderColor: 'red', borderWidth: 3, normal: { areaStyle: { color: {...
2017-05-16 12:00:00
932
转载 html 空格占位符
  == 普通的英文半角空格   == ==   == no-break space (普通的英文半角空格但不换行)   == 中文全角空格 (一个中文宽度)   == &...
2017-05-16 11:31:00
155
转载 h5小技巧总结
1、移动端要加 <metaname="viewport"content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/> 2、back...
2017-01-09 12:59:00
226
转载 HTML5无刷修改url
<!DOCTYPE html><html><head> <meta charset="utf-8" /> <title>HTML5无刷修改url</title> <script type=...
2016-10-10 13:29:00
122
转载 rem
```javascript document.documentElement.style.fontSize = window.innerWidth/3.75 + 'px' ``` ```css html {font-size: calc(100vw/3.75);} ``` ...
2016-09-27 15:47:00
68
转载 常用的一些资源
1. 布局框架: Bootstrap:http://getbootstrap.com/ Foundation:http://foundation.zurb.com/ Uikit:http://www.getuikit.com/ Web Components:http://css...
2016-08-22 14:12:00
156
转载 javascript 模块点击抖动之后变为透明
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title></title> <style> ...
2016-06-08 19:27:00
122
转载 javascript点击之后使元素e左右震动
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title></title> <style> ...
2016-06-08 17:04:00
118
转载 javascript div跟随鼠标移动
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title></title> <style> ...
2016-06-08 16:59:00
176
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人