移动端开发需要加的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. train_action

    # 导入数值计算模块 import numpy as np import tensorflow as tf # 创建计算会话 sess = tf.Session() # 生成数据,创建占位符和变量A ...

  2. Codeforces Round #363 (Div. 2)E. LRU

    E. LRU time limit per test 2 seconds memory limit per test 256 megabytes input standard input output ...

  3. java7中使用透明时与输入法冲突

    在Stackoverflow的这找到了答案,需要设置一下系统参数: static { System.setProperty("sun.java2d.noddraw", " ...

  4. ARM+llinux系统移植3G拨号上网收发短信(一)【转】

    本文转载自:http://blog.csdn.net/hanmengaidudu/article/details/17099737 一.      PPP移植 各项工作具体说明 向Linux内核添加3 ...

  5. python-----列表生成式和列表生成器表达

    列表表达式: 程序一: 常规写法: L = [] for x in range(1, 11): L.append(x * x) print(L) #[1, 4, 9, 16, 25, 36, 49, ...

  6. 洛谷P1600 天天爱跑步——树上差分

    题目:https://www.luogu.org/problemnew/show/P1600 看博客:https://blog.csdn.net/clove_unique/article/detail ...

  7. CentOS下网卡启动、配置等ifcfg-eth0教程

    步骤1.配置/etc/sysconfig/network-scripts/ifcfg-eth0 里的文件. CentOS6.4 下的ifcfg-eth0的配置详情: [root@Jeffery]# v ...

  8. Android 属性系统 Property service 设定分析 (转载)

    转自:http://blog.csdn.net/andyhuabing/article/details/7381879 Android 属性系统 Property service 设定分析 在Wind ...

  9. MyBatis基本应用

    框架的概念: 框架(Framework)是一个提供了可重用的公共结构的半成品. 数据持久化: 数据持久化是将内存中的数据模型转换为存储模型,以及将存储模型转换为内存中的数据模型的统称. ORM(Obj ...

  10. [APIO2007]动物园

    题目描述 新建的圆形动物园是亚太地区的骄傲.圆形动物园坐落于太平洋的一个小岛上,包含一大圈围栏,每个围栏里有一种动物. 你是动物园的公共主管.你要做的是,让每个来动物园的人都尽可能高兴.今天有一群小朋 ...