
移动端
lihefei_coder
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vue-cli使用postcss-pxtorem和amfe-flexible适配移动端屏幕
参考链接 https://www.jianshu.com/p/f4093192e8d8原创 2019-07-28 13:06:08 · 3206 阅读 · 0 评论 -
Hybrid App开发问题记录
一、web前端 1.调用APP原生方法 const nativeOS = { isAndroid() { return /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent); }, isIos() { return /(Android)/i.test(navigator.userAgent); }, isMobi...原创 2019-06-18 15:06:53 · 357 阅读 · 0 评论 -
国内知名互联网企业移动端H5尺寸适配方案
淘宝适配方案 <script> !function(e, t) { var n = t.documentElement , d = e.devicePixelRatio || 1; function i() { var e = n.clientWidth / 3.75; n....原创 2019-06-16 23:57:54 · 2529 阅读 · 0 评论 -
移动端开发调试神器
vConsole 介绍:https://www.oschina.net/p/vconsole 官网:https://alloyteam.github.io/AlloyLever/ eruda 介绍:https://www.cnblogs.com/milo-wjh/p/6807753.html 官网:https://github.com/liriliri/eruda/blob/master/doc/...转载 2019-03-19 19:28:55 · 436 阅读 · 0 评论 -
移动端0.5像素细线
方法一 .line { height: 0.5px; background-color: gray; } 优点:设置简单,ios上实用 缺点:安卓不兼容 方法二 .line { height: 1px; background-color: gray; transform: scaleY(0.5); } 优点:设置简单,兼容ios和安卓 缺点:安卓上效果粗糙 方法三 /* 线条 */ ...原创 2019-03-14 18:34:31 · 1131 阅读 · 0 评论 -
移动端开发常用CSS设置
/* 去掉按钮或链接点击的灰色背景 */ * { -webkit-tap-highlight-color: rgba(0,0,0,0) !important; tap-highlight-color: rgba(0,0,0,0) !important; } /* 尺寸根据尺寸等比缩放 */ html { font-size: 62.5%; } @media only screen and (...原创 2019-03-14 15:03:35 · 441 阅读 · 0 评论 -
meta中viewport属性值
属性 说明 width 视窗宽度,值为字符串"width-device"或一个正整数 height 视窗高度,值为字符串"height-device"或一个正整数 initial-scale 页面初始缩放值,值为数字,并支持小数 minimum-scale 允许用户缩放...原创 2018-11-24 17:34:18 · 840 阅读 · 0 评论 -
移动端还原设计图页面自适应解决方案
淘宝 ! function(e, t) { var n = t.documentElement, d = e.devicePixelRatio || 1; function i() { var e = n.clientWidth / 3.75; n.style.fontSize = e + &quot;px&quot; } if ...原创 2018-08-25 21:31:43 · 1743 阅读 · 0 评论 -
移动端禁用及恢复触摸页面滚动
禁用触屏滚动及恢复 //阻止默认行为函数 function preventDefault(e) { e.preventDefault(); } // 禁用触摸滚动页面 document.addEventListener('touchmove', preventDefault, false); // 恢复触摸滚动页面 document.removeEventListener('to...原创 2018-08-02 21:21:10 · 4564 阅读 · 0 评论