属性基本含义:
content="width=device-width:
控制 viewport 的大小,device-width 为设备的宽度
initial-scale - 初始的缩放比例
minimum-scale - 容许用户缩放到的最小比例
maximum-scale - 容许用户缩放到的最大比例
user-scalable - 用户是否能够手动缩放ios
2.忽略将页面中的数字识别为电话号码
<meta name="format-detection" content="telephone=no" />web
<meta name="apple-mobile-web-app-capable" content="yes" />chrome
<meta name="apple-mobile-web-app-status-bar-style" content="black" />app
<!-- 可选default、black、black-translucent -->字体
<link rel="shortcut icon" href="/favicon.ico">网站
input,textarea {
-webkit-appearance: none;
}scala
3、:在IOS中 禁止长按连接与图片弹出菜单code
a, img {
-webkit-touch-callout: none;
}orm
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{ margin:0; padding:0; } a { text-decoration: none; } ul,ol { margin: 0; padding: 0; list-style: none; } img {vert-align: top;} //移动端图片边框 至关于 border:0 a, input, button { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } //-webkit-tap-highlight-color:rgba(0,0,0,0);//透明度设置为0,去掉点击连接和文本框对象时默认的灰色半透明覆盖层(iOS)或者虚框(Android) input,textarea{outline:none} //取消chrome下默认的文本框聚焦样式 -webkit-appearance: none; //消除输入框和按钮的原生外观,在iOS上加上这个属性才能给按钮和输入框自定义样式 -webkit-user-select: none; // 禁止页面文字选择 ,此属性不继承,通常加在body上规定整个body的文字都不会自动调整 input, button { -webkit-appearance: none; border-radius: 0; } //去掉IOS移除原生控件样式 -webkit-touch-callout:none; // 禁用长按页面时的弹出菜单 body { margin: 0; -webkit-user-select: none; } //禁止移动端用户进行复制.选择. body * { -webkit-user-select: none; font-family: Helvetica; } body { -webkit-text-size-adjust: 100%; } //移动端横竖屏字体乎大乎小 -webkit-text-size-adjust: none; //禁止文字自动调整大小(默认状况下旋转设备的时候文字大小会发生变化),此属性也不继承,通常加在body上规定整个body的文字都不会自动调整