Live2d Test Env
摘要: 一、将一个数组转为用逗号分隔的参数序列。(若数组为空不产生任何效果) console.log(1, ...[2, 3, 4], 5) // 1 2 3 4 5 [...document.querySelectorAll('div')] // [<div>, <div>, <div>] 二、复制数组( 阅读全文
posted @ 2019-11-27 20:05 小猪(朱) 阅读(456) 评论(0) 推荐(0) 编辑
摘要: window.online用户网络连接时被调用 window.offline用户网络断开时被调用 // 监听当前设备在线 window.addEventListener('online', function () { // alert('online'); $('.tips').text('网络已连 阅读全文
posted @ 2019-11-27 20:04 小猪(朱) 阅读(339) 评论(0) 推荐(0) 编辑
摘要: display: block; font-size:12px; overflow: hidden;/*超出部分隐藏*/ white-space: nowrap;/*不换行*/ text-overflow:ellipsis;/*超出部分文字以...显示*/ 今天做东西,遇到了这个问题,百度后总结得到了 阅读全文
posted @ 2019-11-27 20:04 小猪(朱) 阅读(1791) 评论(0) 推荐(0) 编辑
摘要: HTML5规范允许用户自定义网页上任一元素全屏显示。 1、Node.requestFullScreen() 开启全屏显示 2、Node.cancelFullScreen() 关闭全屏显示 由于其兼容性原因,不同浏览器需要添加前缀如: webkit内核浏览器:webkitRequestFullScre 阅读全文
posted @ 2019-11-27 20:03 小猪(朱) 阅读(542) 评论(0) 推荐(0) 编辑
摘要: 使用JavaScript将图片拷贝进画布要想将图片放入画布里,我们使用canvas元素的drawImage方法: // Converts image to canvas; returns new canvas elementfunction convertImageToCanvas(image) { 阅读全文
posted @ 2019-11-27 20:03 小猪(朱) 阅读(299) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> body { padding: 0; margin: 0; /*background: black;*/ } div 阅读全文
posted @ 2019-11-27 20:02 小猪(朱) 阅读(425) 评论(0) 推荐(0) 编辑
摘要: //判断设备类型 var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; // var isIOS = 阅读全文
posted @ 2019-11-27 20:01 小猪(朱) 阅读(225) 评论(0) 推荐(0) 编辑
摘要: <el-row :gutter="20"> <el-col :span="2"> <div class="grid-content"><span class="text-justify goodsImg_title">商品图片</span></div> </el-col> <div class="d 阅读全文
posted @ 2019-11-27 20:00 小猪(朱) 阅读(1308) 评论(0) 推荐(0) 编辑
摘要: /** * http配置 */ import axios from 'axios' import qs from 'qs' import store from '../store/index' import router from '../router/index' import {getStore 阅读全文
posted @ 2019-11-27 19:59 小猪(朱) 阅读(976) 评论(0) 推荐(0) 编辑
摘要: @charset "utf-8"; @psdwidth: 1024; // 设计稿 尺寸 @basesize: 100; // 分为多少份 @bt: 100rem; // 换算值 @fit: 320px, 360px, 375px, 384px, 400px, 414px, 424px, 450px 阅读全文
posted @ 2019-11-27 19:57 小猪(朱) 阅读(919) 评论(0) 推荐(0) 编辑
摘要: function UrlSearch () { var name; var value; var str = location.href; var num=str.indexOf("?"); str=str.substr(num+1); //取得所有参数 stringvar.substr(start 阅读全文
posted @ 2019-11-27 19:57 小猪(朱) 阅读(237) 评论(0) 推荐(0) 编辑
摘要: <script> var obj = [1,4,2,1,3,2,1,4]; var o = {}; for (var index in obj){ if(o.hasOwnProperty(obj[index])){ var obj1 = obj[index]; o[obj1] = o[obj1]+1 阅读全文
posted @ 2019-11-27 19:56 小猪(朱) 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 1 <!DOCTYPE html> 2 <html> 3 <head lang="en"> 4 <meta charset="UTF-8"> 5 <title></title> 6 </head> 7 <body> 8 9 <script> 10 // get the maximum downlin 阅读全文
posted @ 2019-11-27 19:55 小猪(朱) 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.延迟脚本 HTML 4.01 为 <script> 标签定义了 defer 属性。这个属性的用途是表明脚本在执行时不会影响页 面的构造。也就是说,脚本会被延迟到整个页面都解析完毕后再运行。因此,在 <script> 元素中设置 defer 属性,相当于告诉浏览器立即下载,但延迟执行。 <!DOC 阅读全文
posted @ 2019-11-27 19:54 小猪(朱) 阅读(195) 评论(0) 推荐(0) 编辑
摘要: function unique(arr) {//indexOf方法去重1 if (!Array.isArray(arr)) { console.log('type error!'); return } let res = []; for (let i = 0; i < arr.length; i++ 阅读全文
posted @ 2019-11-27 16:57 小猪(朱) 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 安装,引用,这些直接从官网拷贝来的,就不多说了。1、安装使用 npm 安装: npm install v-distpicker --save使用 yarn 安装 yarn add v-distpicker --save2、使用 注册组件 注册全局组件 import VDistpicker from 阅读全文
posted @ 2019-11-27 16:56 小猪(朱) 阅读(4289) 评论(0) 推荐(0) 编辑
摘要: $.ajax({ url: "http://www.hzhuti.com", //请求的url地址 dataType: "json", //返回格式为json async: true, //请求是否异步,默认为异步,这也是ajax重要特性 data: { "id": "value" }, //参数值 阅读全文
posted @ 2019-11-27 11:50 小猪(朱) 阅读(139) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <meta charset="UTF-8"> <title>Document</title> <style> div{ /*background-color: pink;*/ } </style> </head> <body> <div> <span>11</span> 阅读全文
posted @ 2019-11-27 11:49 小猪(朱) 阅读(708) 评论(0) 推荐(0) 编辑
摘要: 1 <!DOCTYPE html> 2 <html> 3 <head lang="en"> 4 <meta charset="UTF-8"> 5 <title></title> 6 <style> 7 /*.Center { 8 width: 500px; 9 height: 500px; 10 p 阅读全文
posted @ 2019-11-27 11:46 小猪(朱) 阅读(185) 评论(0) 推荐(0) 编辑