选择2列表显示问题

时间:2016-11-25 21:53:01

标签: jquery html css

我目前正在处理这个website,而我的select2列表在桌面方面没有正确显示,但在移动版本时它显示为一个字段。我怎样才能看起来像一个列表?



fileExistsAtPath

$(document).ready(function() {
  var cat = ["C"];
  $("#cat").select2({
    data: cat
  });
});
$('select').select2({
  minimumResultsForSearch: -1,
  placeholder: function() {
    $(this).data('placeholder');
  }
});

select {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}
.styleselect {
  margin-right: 2%;
  margin-left: 2%;
  background-image: url("http://s21.postimg.org/nx05vn15f/dropdown_style.png");
  background-position: 117px center;
  background-repeat: no-repeat;
  overflow: hidden;
  vertical-align: middle;
  width: 140 px;
  float: left;
  padding: 0;
  margin: 0;
  display: inline-block;
}
.styleselect select {
  background-color: transparent;
  margin: 0 0 1px;
  color: #ffffff;
  padding: 4px;
  float: left;
  vertical-align: middle;
  width: 140 px;
}
.styleselect select option {
  background-color: #DFD3C3;
  overflow: hidden;
  vertical-align: middle;
  width: 140 px;
  padding: 0;
  margin: 0;
  float: left;
  display: inline-block;
}




0 个答案:

没有答案