编程语言
首页 > 编程语言> > javascript – 如何设置ui-select的大小?

javascript – 如何设置ui-select的大小?

作者:互联网

我正在使用ui-select和bootstrap.我们知道,bootstrap有input-lg,input-sm ……但有没有一个很好的方法来改变ui-select的大小?

解决方法:

你能告诉你什么是“好方法”吗?如果CSS足够好,那么你可以用它来设置元素样式,看起来像这样.

.form-input-sm .ui-select-toggle {height: 40px}

那是为了简单的HTML:

<ui-select theme="bootstrap" ng-model="model">
  <ui-select-match placeholder="Placeholder"></ui-select-match>
  <ui-select-choices refresh-delay="0" repeat="item in roleList">
    <div>{{item.name}}</div>
  </ui-select-choices>
</ui-select>

而且我不是魔术师,我不知道选择器只是在这里看HTML.如果需要找到合适的选择器,可以使用浏览器开发人员工具.例如,相同的技术用于覆盖Bootstrap中的所有默认样式.

标签:javascript,angularjs,ui-select
来源: https://codeday.me/bug/20190706/1399140.html