移动端开发需要加的meta
移动端开发需要加的meta和常用的css3媒体查询样式,移动开发中头部要加的一些常用meta。
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maxinum-scale=1,width=device-width"> <meta content="telephone=no" name="format-detection"> <meta name="applicable-device" content="mobile"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no,email=no">
css 适应不同手机
iphone 4和4s
@media only screen
and (min-device-width:320px)
and (max-device-width:480px)
and (-webkit-min-device-pixel-ratio:2){}
iphone 5 and 5s
@media only screen
and (min-device-width:320px)
and (max-device-width:568px)
and (-webkit-min-device-pixel-ratio:2){}
Android width360
@media only screen
and (min-device-width:360px)
and (max-device-width:640px){
html {font-size:112.5px;}
}
android width411
@media only screen
and (min-device-width:400px)
{
html {font-size:128.4375px;}
}
iphone 6+
@media only screen
and (min-device-width:375px)
and (max-device-width:667px)
and (-webkit-min-device-pixel-ratio:2){
html {font-size:117.1875px;}
}
iphone 6
@media only screen
and (min-device-width:375px)
and (max-device-width:667px)
and (-webkit-min-device-pixel-ratio:2){
html {font-size:129.375px;}
}
重置样式
*{ -webkit-tap-highlight-color:transparent;outline:0;margin:0;padding:0;vertical-align:baseline;fone-size:inherit;line-height:inherit;}
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,li,pre,form,field,legend,button,input,textarea,th,td{margin:0,padding:0,vertical-align:baseline;}
i,em{font-style:normal;}
ol,ul{list-style:none;}
h1,h2,h3,h4,h5,h6,strong,b{font-weight:normal;}
input,select,button,h1,h2,h3,h4,h5,h6{font-size:inherit;font-family:inherit;}
table{border-collapse:collapse;border-spacing:0;}
a{text-decoration:none;color:#666;}
body{margin:0 auto;min-width:320px;max-width:640px;height:100%;font-family:Microsoft Yahei,Helvetica;line-height:1.5;color:#666;-webkit-text-size-adjust:100%!importtant;text-size-adjust:100% !important;}
textarea{resize:none;}
input[type="text"],input[type="tel"],input[type="button"],textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:nione;}
body{font-size:0.14rem;-webkit-overflow-scrolling:touch;}
html{box-sizing:border-box;font-size:100px;height:100%;-webkit-text-size-adjust:none}
*,*:before,*:after{content:"020",display:block;height:0;overflow:hidden;clear:both}
移动端开发需要加的meta的更多相关文章
- 原生js开发,无依赖、轻量级的现代浏览器图片懒加载插件,适合在移动端开发使用
优势 1.原生js开发,不依赖任何框架或库 2.支持将各种宽高不一致的图片,自动剪切成默认图片的宽高 比如说你的默认图片是一张正方形的图片,则各种宽度高度不一样的图片,自动剪切成正方形. 完美解决移动 ...
- 移动端开发注意事项——meta、rem以及弹性盒
移动端开发注意事项——meta.rem以及弹性盒 随着人们对移动端的依赖程度的增强,前端开发对移动端的需求也越来越强烈.那么,在移动端开发中,有哪些事项是需要注意的呢? meta标签 在常规的pc端开 ...
- 29.html5 移动端开发总结
手机与浏览器 浏览器: 移动端开发主要针对手机,ipad等移动设备,随着地铁里的低头族越来越多,移动端开发在前端的开发任务中站的比重也越来越大.各种品牌及尺寸的手机也不尽相同.尺寸不同就算了分辨率,视 ...
- html5 移动端开发
移动端开发总结 目录 1.手机与浏览器 2.Viewport(视窗) 3. 媒体查询 4.px,em,rem,pt 5.设备像素比devicePixelRatio 6.移动web中的图标及字体 ...
- vue2.0做移动端开发用到的相关插件和经验总结1.0
最近在用vue2.0做微信公众号相关的前端开发,经过这次开发实践,现将项目中用到的相关比较实用的插件及遇到的相关问题进行整理,希望和大家共同交流...... cssrem:一个CSS值转REM的VSC ...
- (转)移动端开发总结(一)视口viewport总结
转载链接:移动端开发中,关于适配问题的一点总结(一) 视口 布局视口layout viewport 视觉视口visual viewport 理想视口 缩放 一个重大区别 最小缩放 和最大缩放 分辨率 ...
- [转] -- html5手机网站自适应需要加的meta标签
webapp开发初期,会碰到在pc端开发好的页面在移动端显示过大的问题,这里需要在html head中加入meta标签来控制缩放 <meta name=" viewport" ...
- web移动端开发技巧与注意事项汇总
一.meta的使用 1.<meta name="viewport" content="width=device-width,initial-scale=1.0, m ...
- 移动端开发viewport深入理解(转)
一.viewport的概念 移动设备上的viewport就是设备的屏幕上能用来显示我们的网页的那一块区域,就是浏览器上用来显示网页的那部分区域,但viewport不局限于浏览器可视区域 的大小,它 ...
随机推荐
- ImportError: No module named flask.ext.login
from flask.ext.login import current_user python 3.x中,上面代码会报错:ImportError: No module named flask.ext. ...
- uva10870
https://vjudge.net/problem/UVA-10870 裸的矩阵快速幂 注意系数矩阵在前面 因为系数矩阵为d*d 方程矩阵为d * 1 放反了就是d * 1 d * d 不符合矩阵乘 ...
- svchost.exe 占用内存过多
http://www.tomshardware.com/forum/20583-63-svchost-netsvcs-speed By Lokesh Chandra: Just Go to Contr ...
- C++中正确使用PRId64 (转载)
转自:http://blog.csdn.net/win_lin/article/details/7912693 例子参考高性能流媒体服务器SRS:https://github.com/winlinvi ...
- XML消息解析_php
初识php——微信消息处理 <?php $test = new weixin(); $test->Message(); class weixin{ public function Mess ...
- bzoj 1599: [Usaco2008 Oct]笨重的石子【枚举】
--我为什么要写这种题解-- 枚举投掷情况即可 #include<iostream> #include<cstdio> using namespace std; int s1, ...
- 11.7NOIP模拟题
/* 有循环节 */ #include<cstdio> #include<cstring> #include<iostream> #include<algor ...
- VBNET AutoCAD Activex 切换图层为当前图层失效
最近有朋友询问切换图层的代码 com切换图层 <CommandMethod("mycl")> Public Sub MySubLayerChange() Dim Thi ...
- swoole之 swoole_process 应用于TP框架
swoole_process 实现了多进程的管理,多个进程同时进行采集任务, 公司的框架比较low,用的tp框架,结合tp框架实现多进程的采集 这是swoole好的学习资源 https://segme ...
- ACM_求f(n)
求f(n) Time Limit: 2000/1000ms (Java/Others) Problem Description: 设函数f(n)=1*1*1+2*2*2+3*3*3+...+n*n*n ...