各個瀏覽器的兼容問題及樣式兼容處理(不按期補充)

遇到問樣式兼容問題1:css

問題:火狐瀏覽器select下拉框選擇後會出現一條虛線邊框?html

解決方法:web

@-moz-document url-prefix() {
  select.form-control {
    -moz-appearance: none;
    appearance: none;
    background-image: url("http://221.228.109.114:8083/manage/more/firefox_select_icon.png");
    background-repeat: no-repeat;
    background-position: calc(100% - 7px) 50%;
    background-size: 2% auto;
    border-radius: 3px;
    padding: 0;
  }
}

 問題:火狐瀏覽器select下拉框右側的三角形下拉圖標樣式很醜,不是本身寫的樣式?瀏覽器

解決辦法:app

select {
  /*Chrome同Firefox與IE裏面的右側三角顯示的樣式不一樣*/
  border: solid 1px #ddd;
  /*將默認的select選擇框樣式清除*/
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  padding-right: 14px;
  /*若是要加入自定義圖片, 就增長這個屬性 background: url或者在html中直接加入圖標也行*/
}
/*清除iIE的默認選擇框樣式*/
select::-ms-expand {
  display: none;
}
相關文章
相關標籤/搜索