angularjs selectBoxIt自定义主题

时间:2016-02-03 10:13:41

标签: javascript jquery angularjs selectboxit

我在项目中使用selectBoxIt组件。我想改变风格,像这样: enter image description here

我使用下一个代码来实现这个组件:

 <select id="appVersions">
            <option ng-repeat="app in appVersions" value="{{app.version}}">APP vr.{{app.version}}</option>
          </select>



  var apps = $('#appVersions').selectBoxIt({
                        theme: 'jqueryui',
                        autoWidth: true
                    });

                    $timeout(function () {
                        apps.data('selectBox-selectBoxIt').refresh();
                    });

但是在他转变为默认风格后,如何改变风格? 非常感谢。

1 个答案:

答案 0 :(得分:1)

将ID添加到标签中选择

#appVersions .selectboxit-container {
    margin-top: 10px;
    margin-left: 70px;
    background-color: $main-background;
  }

  #appVersions .selectboxit-container span #SelectBoxItText {
    color: #FFB201;
    font-weight: bold;
  }

  #appVersions ul li a {
    color: #FFB201;
  }

  #appVersions ul li a:hover {
    font-weight: bold;
  }

  #appVersions ul {
    background-color: $main-background;
  }