移动端开发需要加的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的更多相关文章

  1. 原生js开发,无依赖、轻量级的现代浏览器图片懒加载插件,适合在移动端开发使用

    优势 1.原生js开发,不依赖任何框架或库 2.支持将各种宽高不一致的图片,自动剪切成默认图片的宽高 比如说你的默认图片是一张正方形的图片,则各种宽度高度不一样的图片,自动剪切成正方形. 完美解决移动 ...

  2. 移动端开发注意事项——meta、rem以及弹性盒

    移动端开发注意事项——meta.rem以及弹性盒 随着人们对移动端的依赖程度的增强,前端开发对移动端的需求也越来越强烈.那么,在移动端开发中,有哪些事项是需要注意的呢? meta标签 在常规的pc端开 ...

  3. 29.html5 移动端开发总结

    手机与浏览器 浏览器: 移动端开发主要针对手机,ipad等移动设备,随着地铁里的低头族越来越多,移动端开发在前端的开发任务中站的比重也越来越大.各种品牌及尺寸的手机也不尽相同.尺寸不同就算了分辨率,视 ...

  4. html5 移动端开发

    移动端开发总结     目录 1.手机与浏览器 2.Viewport(视窗) 3. 媒体查询 4.px,em,rem,pt 5.设备像素比devicePixelRatio 6.移动web中的图标及字体 ...

  5. vue2.0做移动端开发用到的相关插件和经验总结1.0

    最近在用vue2.0做微信公众号相关的前端开发,经过这次开发实践,现将项目中用到的相关比较实用的插件及遇到的相关问题进行整理,希望和大家共同交流...... cssrem:一个CSS值转REM的VSC ...

  6. (转)移动端开发总结(一)视口viewport总结

    转载链接:移动端开发中,关于适配问题的一点总结(一) 视口 布局视口layout viewport 视觉视口visual viewport 理想视口 缩放 一个重大区别 最小缩放 和最大缩放 分辨率 ...

  7. [转] -- html5手机网站自适应需要加的meta标签

    webapp开发初期,会碰到在pc端开发好的页面在移动端显示过大的问题,这里需要在html head中加入meta标签来控制缩放 <meta name=" viewport" ...

  8. web移动端开发技巧与注意事项汇总

    一.meta的使用 1.<meta name="viewport" content="width=device-width,initial-scale=1.0, m ...

  9. 移动端开发viewport深入理解(转)

    一.viewport的概念   移动设备上的viewport就是设备的屏幕上能用来显示我们的网页的那一块区域,就是浏览器上用来显示网页的那部分区域,但viewport不局限于浏览器可视区域 的大小,它 ...

随机推荐

  1. override (C# Reference)

    https://msdn.microsoft.com/en-us/library/ebca9ah3.aspx The override modifier is required to extend o ...

  2. YTU 2630: E2 驾驭const

    2630: E2 驾驭const 时间限制: 1 Sec  内存限制: 128 MB 提交: 673  解决: 491 题目描述 引入了const关键词,用于指定"常"对象及&qu ...

  3. SQLALchemy之ORM操作

    1.仍然要创建引擎 2.创建session会话 (1)方式一 engine =create_engine("mysql+pymysql://root:123@127.0.0.1:3306/s ...

  4. 20. Extjs学习笔记——Ext.data.JsonStore使用说明

    Ext.data.JsonStore继承于Ext.data.Store,使得从远程JSON数据创建stores更为方便的简单辅助类.JsonStore合成了Ext.data.HttpProxy与Ext ...

  5. bzoj3252攻略(线段树+dfs序)

    3252: 攻略 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 562  Solved: 238[Submit][Status][Discuss] D ...

  6. Notepad++安装插件

    https://sourceforge.net/projects/npp-plugins/files/ 下载完插件后,通过notepad++的设置>>>>导入>>& ...

  7. python自动化测试学习笔记-unittest参数化

    做接口测试的时候,当一个参数需要输入多个值的时候,就可以使用参数来实现: python中unittest单元测试,可以使用nose_parameterized来实现: 首先需要安装:pip  inst ...

  8. F - System Overload(约瑟夫环变形)

    Description Recently you must have experienced that when too many people use the BBS simultaneously, ...

  9. Android 性能优化(23)*性能工具之「Heap Viewer, Memory Monitor, Allocation Tracker」Memory Profilers

    Memory Profilers In this document Memory Monitor Heap Viewer Allocation Tracker You should also read ...

  10. SqlServer数据库(可疑)解决办法

    -- 当数据库发生这种操作故障时,可以按如下操作步骤可解决此方法,打开数据库里的Sql 查询编辑器窗口,运行以下的命令. --1.修改数据库为紧急模式 ALTER DATABASE Zhangxing ...