【发布时间】:2017-11-22 06:10:39
【问题描述】:
我正在尝试更改 ion-checkbox 内复选标记的颜色。复选框有白色背景,复选标记是白色的,我想让复选标记是黑色而不是白色。这就是我目前所拥有的
.checkbox-icon::before {
background-color: white !important;
}
.checkbox-icon::after {
color: black !important;
}
<ion-item ng-repeat="list in modal.item.modifier_lists | orderBy: 'ordinal'"
ng-if="list.modifier_options[0].name">
<div ng-if="list.modifier_options.length === 1"
class="row">
<div class="col">
<ion-checkbox ng-model="list.modifier_options[0].selected"
ng-checked="list.modifier_options[0].selected"
class="button-orange checkbox-stable">
<span class="pull-right">{{list.modifier_options[0].name}}</span>
</ion-checkbox>
</div>
</div>
</ion-item>
【问题讨论】:
-
每ionicframework.com/docs/api/components/checkbox/Checkbox你改变
border-color.checkbox-inner -
.checkbox-inner我必须将这个类添加到 html 中还是它是为 ion-checkbox @MichaelCoker 内置的类 -
对不起,我不知道。我从来没有用过离子。如果您有一个渲染复选框的工作演示,我可以告诉您要更改哪些 CSS。所以我去离子网站看看他们是否有演示。我能做的最好的:)
标签: css checkbox ionic-framework colors less