Styling of Select2 dropdown select boxes

前端 未结 3 2052
梦毁少年i
梦毁少年i 2020-12-30 00:30

I\'m using Select2 in a project to style some select boxes in a search form. I managed to change the gradient background of the arrow container to a black gradient:

3条回答
  •  余生分开走
    2020-12-30 01:15

    This is how i changed placeholder arrow color, the 2 classes are for dropdown open and dropdown closed, you need to change the #fff to the color you want:

    .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
        border-color: transparent transparent #fff transparent !important;
      }
      .select2-container--default .select2-selection--single .select2-selection__arrow b {
        border-color: #fff transparent transparent transparent !important;
      }
    

提交回复
热议问题