css--pc端公共样式汇总

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike,
strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td ,textarea,input { margin:0; padding:0;  }
address,cite,dfn,em,var, i {font-style:normal;}
body {font-size: 16px; line-height: 1.5; font-family:'Microsoft Yahei','simsun','arial','tahoma';  color: #222; background: #eee; }
table { border-collapse:collapse; border-spacing:0; }
h1, h2, h3, h4, h5, h6, th { font-size: 100%; font-weight: normal; }
button,input,select,textarea{font-size:100%;}
fieldset,img{border:0;}
a { text-decoration: none; color: #666; background: none }
ul, ol { list-style: none; }
:focus{ outline:none;}
.clearfix{ clear: both; content: ""; display: block; overflow: hidden }
.clear{clear: both;}
.fl{ float: left; }
.fr{float: right;}

2 禁止ios识别长传数字为电话


5.不让 Android 手机识别邮箱


6.禁止 iOS 识别长串数字为电话


7.禁止 iOS 弹出各种操作窗口

-webkit-touch-callout:none

8.消除 transition 闪屏
-webkit-transform-style: preserve-3d; /设置内嵌的元素在 3D 空间如何呈现:保留 3D/
-webkit-backface-visibility: hidden; /(设置进行转换的元素的背面在面对用户时是否可见:隐藏)/
9.iOS 系统中文输入法输入英文时,字母之间可能会出现一个六分之一空格
可以通过正则去掉 this.value = this.value.replace(/\u2006/g, ‘’);
10.禁止ios和android用户选中文字

-webkit-user-select:none

11.在ios和andriod中,audio元素和video元素在无法自动播放
应对方案:触屏即播

$('html').one('touchstart',function(){
    audio.play()
})

12.ios下取消input在输入的时候英文首字母的默认大写


13.android下取消输入语音按钮

input::-webkit-input-speech-button {display: none}

1 input苹果兼容 全局样式:

input[type=button], input[type=submit], input[type=file], button { cursor: pointer; -webkit-appearance: none; }

解决背景颜色在iOS下颜色发白的问题

你可能感兴趣的:(css)