上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 34 下一页
摘要: 引入引擎文件 template.js 1,定义引擎模块 <script type="text/html" class="card-tpl"> <!-- 生成案例列表循环 --> <%for(var i = 0;i < cards.length; i++){%> <div class="card-wr 阅读全文
posted @ 2020-08-27 12:06 琥珀君 阅读(192) 评论(0) 推荐(0)
摘要: 1, .project-header { height: 64px; font-size: 20px; text-align: center; /* position: relative; */ background:transparent; position:absolute; z-index: 阅读全文
posted @ 2020-08-27 11:52 琥珀君 阅读(436) 评论(0) 推荐(0)
摘要: 1, // 根据屏幕宽度,动态设置字体的大小 !function(o, e) { var n = o.documentElement, t = (window, function() { var o = n.clientWidth; o && (n.style.fontSize = o > 768 阅读全文
posted @ 2020-08-25 17:27 琥珀君 阅读(539) 评论(0) 推荐(0)
摘要: 1, 移动端click时间、touch事件、tap事件详解 一、click 和 tap 比较 两者都会在点击时触发,但是在手机WEB端,click会有 200~300 ms,所以请用tap代替click作为点击事件。 singleTap和doubleTap 分别代表单次点击和双次点击。 二、关于ta 阅读全文
posted @ 2020-08-25 17:09 琥珀君 阅读(326) 评论(0) 推荐(0)
摘要: 1, 打开链接时 ,改为 replace的方式打开 // window.location.href = "" + url; window.location.replace("" + url); js禁止原生手机返回键(物理返回键) $(document).ready(function() { if 阅读全文
posted @ 2020-08-24 17:38 琥珀君 阅读(511) 评论(0) 推荐(0)
摘要: 1, <!--百度统计代码及百度统计代码安装说明如下--> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://" 阅读全文
posted @ 2020-08-23 10:25 琥珀君 阅读(184) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-23 10:16 琥珀君 阅读(261) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2020-08-22 12:50 琥珀君 阅读(0) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-21 11:42 琥珀君 阅读(280) 评论(0) 推荐(0)
摘要: 1,禁止拖动 2,禁止选中文字图片等 body { height: 100%; overflow: hidden; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; color: #666; background-color: #ff 阅读全文
posted @ 2020-08-20 23:10 琥珀君 阅读(1540) 评论(0) 推荐(0)
摘要: 1, /* 通用样式 */ *,::after,::before { margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; -webkit-box-sizing: border-box; -moz-box-sizing: b 阅读全文
posted @ 2020-08-20 22:29 琥珀君 阅读(198) 评论(0) 推荐(0)
摘要: 1. 点击“属性”,选择菜单中的“文件关联”。 2. 在弹出的新窗口中点击如图所示的一个添加按钮。 3. 点击添加一个文件掩码,就会弹出一个新的窗口。 4. 现在可以添加掩码了,也就是关联你想要关联文件的扩展名,格式一定要是“*.php”或者“*.html”(关联多个扩展名时用“;”隔开)。如果只写 阅读全文
posted @ 2020-08-20 18:25 琥珀君 阅读(221) 评论(0) 推荐(0)
摘要: 1, !function() { var t = navigator.userAgent.toLowerCase(), a = 1; /iphone|ipad|ipod/.test(t) ? a = 2 : /android/.test(t) && (a = 1), //判断是不是微信浏览器 2 = 阅读全文
posted @ 2020-08-20 11:00 琥珀君 阅读(274) 评论(0) 推荐(0)
摘要: 1,就是为了让匿名函数在声明完后就立即执行 阅读全文
posted @ 2020-08-20 10:57 琥珀君 阅读(428) 评论(0) 推荐(0)
摘要: 1,test方法 2,toLowerCase方法 3,match 阅读全文
posted @ 2020-08-20 10:41 琥珀君 阅读(126) 评论(0) 推荐(0)
摘要: 1, 为什么要使用FastClick 移动设备上的浏览器默认会在用户点击屏幕大约延迟300毫秒后才会触发点击事件,这是为了检查用户是否在做双击。为了能够立即响应用户的点击事件,才有了FastClick。 项目地址:https://github.com/ftlabs/fastclick 2,使用 $( 阅读全文
posted @ 2020-08-20 10:16 琥珀君 阅读(174) 评论(0) 推荐(0)
摘要: 1,class类的定义 class WebAR { /** * 初始化Web AR * @param interval 识别间隔(毫秒) * @param recognizeUrl 识别服务地址 * @param isDebug 是否输入调试信息 * @param token 非必需,使用token 阅读全文
posted @ 2020-08-19 22:27 琥珀君 阅读(1163) 评论(0) 推荐(0)
摘要: 1, httpPost(image) { return new Promise((resolve, reject) => { const http = new XMLHttpRequest(); http.onload = () => { try { const msg = JSON.parse(h 阅读全文
posted @ 2020-08-19 18:13 琥珀君 阅读(343) 评论(0) 推荐(0)
摘要: 1, var str = {"name":"菜鸟教程", "site":"http://www.runoob.com"} str_pretty1 = JSON.stringify(str) 阅读全文
posted @ 2020-08-19 18:03 琥珀君 阅读(206) 评论(0) 推荐(0)
摘要: 1, <canvas id="canvas" width="5" height="5"></canvas> 可以用这样的方式获取一个 data-URL var canvas = document.getElementById("canvas"); var dataURL = canvas.toDat 阅读全文
posted @ 2020-08-19 17:41 琥珀君 阅读(876) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 34 下一页