08 2020 档案
摘要:引入引擎文件 template.js 1,定义引擎模块 <script type="text/html" class="card-tpl"> <!-- 生成案例列表循环 --> <%for(var i = 0;i < cards.length; i++){%> <div class="card-wr
阅读全文
摘要:1, .project-header { height: 64px; font-size: 20px; text-align: center; /* position: relative; */ background:transparent; position:absolute; z-index:
阅读全文
摘要:1, // 根据屏幕宽度,动态设置字体的大小 !function(o, e) { var n = o.documentElement, t = (window, function() { var o = n.clientWidth; o && (n.style.fontSize = o > 768
阅读全文
摘要:1, 移动端click时间、touch事件、tap事件详解 一、click 和 tap 比较 两者都会在点击时触发,但是在手机WEB端,click会有 200~300 ms,所以请用tap代替click作为点击事件。 singleTap和doubleTap 分别代表单次点击和双次点击。 二、关于ta
阅读全文
摘要:1, 打开链接时 ,改为 replace的方式打开 // window.location.href = "" + url; window.location.replace("" + url); js禁止原生手机返回键(物理返回键) $(document).ready(function() { if
阅读全文
摘要:1, <!--百度统计代码及百度统计代码安装说明如下--> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"
阅读全文
摘要:1, <!-- Google Tag Manager 20180706添加--> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var
阅读全文
摘要:1, <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> window.onload = funct
阅读全文
摘要:1,禁止拖动 2,禁止选中文字图片等 body { height: 100%; overflow: hidden; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; color: #666; background-color: #ff
阅读全文
摘要:1, /* 通用样式 */ *,::after,::before { margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; -webkit-box-sizing: border-box; -moz-box-sizing: b
阅读全文
摘要:1. 点击“属性”,选择菜单中的“文件关联”。 2. 在弹出的新窗口中点击如图所示的一个添加按钮。 3. 点击添加一个文件掩码,就会弹出一个新的窗口。 4. 现在可以添加掩码了,也就是关联你想要关联文件的扩展名,格式一定要是“*.php”或者“*.html”(关联多个扩展名时用“;”隔开)。如果只写
阅读全文
摘要:1, !function() { var t = navigator.userAgent.toLowerCase(), a = 1; /iphone|ipad|ipod/.test(t) ? a = 2 : /android/.test(t) && (a = 1), //判断是不是微信浏览器 2 =
阅读全文
摘要:1,就是为了让匿名函数在声明完后就立即执行
阅读全文
摘要:1,test方法 2,toLowerCase方法 3,match
阅读全文
摘要:1, 为什么要使用FastClick 移动设备上的浏览器默认会在用户点击屏幕大约延迟300毫秒后才会触发点击事件,这是为了检查用户是否在做双击。为了能够立即响应用户的点击事件,才有了FastClick。 项目地址:https://github.com/ftlabs/fastclick 2,使用 $(
阅读全文
摘要:1,class类的定义 class WebAR { /** * 初始化Web AR * @param interval 识别间隔(毫秒) * @param recognizeUrl 识别服务地址 * @param isDebug 是否输入调试信息 * @param token 非必需,使用token
阅读全文
摘要:1, httpPost(image) { return new Promise((resolve, reject) => { const http = new XMLHttpRequest(); http.onload = () => { try { const msg = JSON.parse(h
阅读全文
摘要:1, var str = {"name":"菜鸟教程", "site":"http://www.runoob.com"} str_pretty1 = JSON.stringify(str)
阅读全文
摘要:1, <canvas id="canvas" width="5" height="5"></canvas> 可以用这样的方式获取一个 data-URL var canvas = document.getElementById("canvas"); var dataURL = canvas.toDat
阅读全文
摘要:1,
阅读全文
摘要:JS中find(), findIndex(), filter(), forEach(), some(), every(), map()方法 1. find()与findIndex() find()方法,用于找出第一个符合条件的数组成员。它的参数是一个回调函数,所有数组成员依次执行该回调函数,直到找出
阅读全文
摘要:1, listCamera(videoDevice) { return new Promise((resolve, reject) => { navigator.mediaDevices.enumerateDevices() .then((devices) => { let index = 1; d
阅读全文
摘要:1, document.querySelector('#openCamera').addEventListener('click', function () { const videoSelect = document.querySelector('#videoDevice'); webAR.lis
阅读全文
摘要:1, <script> (function(){ const now = (new Date()).getTime(); const e = document.createElement('script'); e.setAttribute('src', `asset/js/app.js?t=${no
阅读全文
摘要:1, <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>WebAR Demo</title> <meta name="viewport" content="width=device-width, initial
阅读全文
摘要:1, MeterialUv.prototype.upAdoEssLoop = function(e, a, b, s) { if (e) { upAdoEssLoop.upAdoEssFlag ? (e.emissiveIntensity += s) : (e.emissiveIntensity -
阅读全文
摘要:1, switch(true){ case TXrotY < 10 : console.log("Y10"); break; case TXrotY < 20 : console.log("Y20"); break; default : break; }
阅读全文
摘要:1, CameraColorShift.prototype.OnColorShift = function(a) { switch (a) { case 0: targetColor = this.colorTable_1; break; case 1: targetColor = this.col
阅读全文
摘要:1, $.get("https://xxx/gjbz_share.json", function(e) { t._path = e[t.name] })
阅读全文
摘要:1, css样式 /* 导航主按钮 模板2 */ .iconElement { width: 50%; /* 高度等于 这个元素的宽度 * li元素的宽度 */ height: 2vw; text-align: center; display: inline-block; position: abs
阅读全文
摘要:1, <div class="leftButton" id="leftBtn" ondragstart="return!1" oncontextmenu="return!1" onselectstart="return!1"></div>
阅读全文
摘要:1, html 文件 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-sc
阅读全文
摘要:1, 有bind(this)就能获取 this.bl_First 的值,否则就不能获取值
阅读全文
摘要:1, * { /* IOS平台下点击按钮,会出现一个半透明的灰色背景,alpha值为0即为禁用 */ -webkit-tap-highlight-color: rgba(255, 255, 255, 0); -webkit-touch-callout: none; -webkit-user-sele
阅读全文
摘要:1, // 自执行区域 (function () { })(); 2, function(a, r, u) { console.log("自执行方法"); a.alert("haodi"); }(window, document, Math),
阅读全文
摘要:1, // 文字滚动 // <marquee><span style="font-weight: bolder;font-size: 40px;color: white;">Welcom CSDN!</span></marquee> 文字出现滚动条 在设置了overflow:auto;或者overf
阅读全文

浙公网安备 33010602011771号