移动端开发需要加的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不局限于浏览器可视区域 的大小,它 ...
随机推荐
- Codeforces Round #320 (Div. 2) [Bayan Thanks-Round] D "Or" Game 枚举+前缀后缀
D. "Or" Game ...
- TableLayout与MigLayout
最近新接触的两个Layout,另外之前用的GridBagLayoutHelper以及最近听说的Qt for java的QCSS据说也不错, 只是Qt的跨平台需要单独发布,假如使用QT for java ...
- 通过绑定ip地址可以暂时解决抢占ip问题
以前设置的路由器密码都忘记了 admin重复,在工作上遇到了 一个去除str左右两边的空格换行符回车等 trim
- BZOJ_4398_福慧双修&&BZOJ_2407_探险_分治+dij
BZOJ_4398_福慧双修&&BZOJ_2407_探险_分治+dij Description 菩萨为行,福慧双修,智人得果,不忘其本. ——唐朠立<大慈恩寺三藏法师传> ...
- POJ1385 Lifting the Stone 多边形重心
POJ1385 给定n个顶点 顺序连成多边形 求重心 n<=1e+6 比较裸的重心问题 没有特别数据 由于答案保留两位小数四舍五入 需要+0.0005消除误差 #include<iostr ...
- RDA UMF进程 & UMF_IR.C 遥控处理
SIS架构图: SW Structure APP Event Flow :消息分发流程 UMF进程: int umf_main(int argc, char* argv[]) { umf_Init() ...
- bzoj 1616: [Usaco2008 Mar]Cow Travelling游荡的奶牛【dp】
写了个bfs发现MLE了... 设f[t][i][j]为在t时刻走到(i,j)的方案数,转移和bfs一样 #include<iostream> #include<cstdio> ...
- poj2096Collecting Bugs(概率期望dp)
Collecting Bugs Time Limit: 10000MS Memory Limit: 64000K Total Submissions: 6400 Accepted: 3128 ...
- js 本地存储 localStorage 之 angular
今天项目中用到 php yii框架 用的不是 angular路由 所以用rootScope传值是不行的 我就用到了 localStorage 本地持久化存储 如下 set 顾名思义是设置 值 loca ...
- CSS布局大全
前几天面试,问我某布局感觉回答不是很OK所以研究了一下各种布局. 一.单列布局 1.普通布局(头部.内容.底部) <div class="container"> < ...