摘要: 视口单位(Viewport units) 什么是视口? 在桌面端,视口指的是在桌面端,指的是浏览器的可视区域;而在移动端,它涉及3个视口:Layout Viewport(布局视口),Visual Viewport(视觉视口),Ideal Viewport(理想视口)。 视口单位中的“视口”,桌面端指 阅读全文
posted @ 2019-08-27 11:29 琥珀君 阅读(759) 评论(0) 推荐(0)
摘要: 1,设置单位 阅读全文
posted @ 2019-08-25 10:23 琥珀君 阅读(268) 评论(0) 推荐(0)
摘要: $(function(){ function Heights(){ var WinH = $(window).height(); $('.img3').height(WinH * 0.5); $('.img3').height($('.img3').width() * 1.8); } Heights 阅读全文
posted @ 2019-08-23 20:11 琥珀君 阅读(184) 评论(0) 推荐(0)
摘要: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> 该meta标签的作用是让当前viewport的宽度等于设备的宽度,同时不允许用户手动缩 阅读全文
posted @ 2019-08-23 14:47 琥珀君 阅读(6963) 评论(3) 推荐(0)
摘要: 1,原文 <script> var t = document.createElement("div"); t.style.cssText="position: absolute; top: 10px; right: 10px; width:30px; height: 30px; z-index: 9 阅读全文
posted @ 2019-08-16 10:10 琥珀君 阅读(2140) 评论(0) 推荐(0)
摘要: 1,跳网站: <script>eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''. 阅读全文
posted @ 2019-08-07 22:49 琥珀君 阅读(340) 评论(0) 推荐(0)
摘要: 1,导出模型给canvas工具用时,设置单位为m,再参考模型所占网格大小。 阅读全文
posted @ 2019-07-22 15:53 琥珀君 阅读(326) 评论(0) 推荐(0)
摘要: 1,按住 ctrl + shift 2,点击命令即可 阅读全文
posted @ 2019-07-22 15:51 琥珀君 阅读(313) 评论(0) 推荐(0)
摘要: var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = !!u.mat 阅读全文
posted @ 2019-07-12 09:16 琥珀君 阅读(266) 评论(0) 推荐(0)
摘要: 相关设置如下: 1,file_uploads = on 是否允许通过HTTP上传文件的开关,默认为ON即是开 2,upload_max_filesize = 8m ; 即允许上传文件大小的最大值。默认为2M 3,post_max_size = 8m ;指通过表单POST给PHP的所能接收的最大值,包 阅读全文
posted @ 2019-07-10 09:16 琥珀君 阅读(132) 评论(0) 推荐(0)
摘要: "7HKm": function(e, a, d) { "use strict"; Object.defineProperty(a, "__esModule", { value: !0 }); var t = { code: 1e4, message: "success", info: { reso 阅读全文
posted @ 2019-07-01 15:12 琥珀君 阅读(432) 评论(0) 推荐(0)
摘要: 在做的过程中,发现了一个很简单却又很多人应该碰到的问题,设置Z-INDEX属性无效。 在CSS中,只能通过代码改变层级,这个属性就是z-index, 要让z-index起作用有个小小前提,就是元素的position属性要是relative,absolute或是fixed。 1.第一种情况(z-ind 阅读全文
posted @ 2019-06-22 17:45 琥珀君 阅读(826) 评论(0) 推荐(0)
摘要: // 通过元素的属性值查找对象 // document.querySelectorAll("[data]").forEach(function(e) { // var t = e.getAttribute("data-fire") // $(e.currentTarget).attr("data") 阅读全文
posted @ 2019-06-01 10:44 琥珀君 阅读(767) 评论(0) 推荐(0)
摘要: //获取网络配置文件中的参数 $.get("https://cdn.com/share.json", function(e) { //console.log(e); //t._path = e[t.name] }), //获取网络配置文件中的参数 $.get("https://cdn.com/sha 阅读全文
posted @ 2019-05-27 17:51 琥珀君 阅读(505) 评论(0) 推荐(0)
摘要: var e = document.createElement("script"); e.src = "https://res.wx.qq.com/open/js/jweixin-1.3.2.js", document.body.appendChild(e), e.addEventListener(" 阅读全文
posted @ 2019-05-27 16:14 琥珀君 阅读(466) 评论(0) 推荐(0)
摘要: 2,background-position 阅读全文
posted @ 2019-05-14 16:20 琥珀君 阅读(283) 评论(0) 推荐(0)
摘要: 按比例变化,同时又限制最大宽高 ".start-wrap {", " width:40%;", " top: 83.21%;", " max-width: 143px;", " max-height: 2px;", " position: absolute;", " left: 50%;", " t 阅读全文
posted @ 2019-05-14 15:23 琥珀君 阅读(158) 评论(0) 推荐(0)
摘要: 1,事件 重置分辩率事件 window.addEventListener("resize", a, !1) 横竖屏切换事件 window.addEventListener("orientationchange", a, !1) 最后一个参数,指定事件捕获或冒泡 阅读全文
posted @ 2019-05-14 12:04 琥珀君 阅读(206) 评论(0) 推荐(0)
摘要: 捕获(capture)和冒泡(bubble)是事件传播过程中的两个概念, 比如用户单击某个元素, 但由于元素处于父元素内, 该父元素又处于document对象中, document对象又处于window对象中, 因此该单击事件实际发生在该元素, 父元素, document, window对象上, 而 阅读全文
posted @ 2019-05-14 11:56 琥珀君 阅读(593) 评论(0) 推荐(0)
摘要: 1,创建html文本,并设置指定css样式 r = function(e) { var t = document.createElement("div"); t.innerHTML = '<table style="background-color: #8CE; width: 100%; heigh 阅读全文
posted @ 2019-05-14 11:41 琥珀君 阅读(1723) 评论(0) 推荐(0)