- 日期兼容性
-
安卓系統下
Date.parse(new Date(‘2018-03-30 12:00:00’))
會直接轉換成時間戳的形式(簡單說就是整數形式) -
ios系統下
Date.parse(new Date(‘2018-03-30 12:00:00’))
sorry,轉換不了
解決辦法:
Date.parse(new Date(‘2018/03/30 12:00:00’))
- input框聚焦,ios出現outline或者陰影,安卓顯示正常
解決辦法:
input:focus{outline:none} //去除外邊框
input:{-webkit-appearance: none;}
- ios系統,會將數字當成電話號碼,導致變色
解決辦法:
<meta name="format-detection" content="telephone=no">
<meta http-equiv="x-rim-auto-match" content="none">
- input 的placeholder屬性會使文本位置偏上
解決辦法:
line-height: (和input框的高度一樣高)//pc端解決方法
line-height:normal //移動端解決方法
- input type=number之后,pc端出現上下箭頭
解決辦法:
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
- 禁止安卓識別email
解決辦法:
<meta content="email=no" name="format-detection" />
- ios 設定input 按鈕樣式會被默認樣式覆寫
解決辦法:
input,textarea {
border: 0;
-webkit-appearance: none; }
以上是一些常遇到的兼容問題,希望對你有所幫助
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/80215.html
標籤:其他
下一篇:幾何原本研究
