移动端开发需要加的meta

原文链接: http://caibaojian.com/mobile-meta-2.html

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

//code from http://caibaojian.com/mobile-meta-2.html
@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;}

 

来源: 前端开发博客
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值