Select2 样式

  1. 设置显示框内文字的大小和样式
.select2-container--default .select2-selection--single .select2-selection__rendered {
        font-family: MicrosoftYaHei;
        font-size: 14px;
        line-height: 28px;
}  
  1. 设置显示框的样式
.select2-container .select2-selection--single {
      height: 28px !important;
      border: 1px solid #B4B4B4;
      border-radius: 3px 3px;
}  
  1. 设置下拉框的位置(忘记有没有用了,需要测试)
 .select2-container--default .search_select_input {
       width: 79px !important;
       border: 1px solid #b4b4b4;
       font-size: 13px;
       padding-left: 5px;
       font-family: MicrosoftYaHei;
} 
  1. 设置下拉框选项中的文字样式和大小
.select2-results__option {
        font-size: 14px;
}  

猜你喜欢

转载自blog.csdn.net/Bambi12/article/details/84342940