【问题标题】:How to add particular class to li? ngTagsInput in AngularJS如何在 li 中添加特定的类? AngularJS 中的 ngTagsInput
【发布时间】:2017-05-30 08:51:49
【问题描述】:

我有一个由ngTagsInput 创建的 li 项目列表,我想将选定的类添加到特定的 li 项目中,该项目在某种程度上 不相关

有人可以帮忙吗?如果你想让我详细说明这个问题,我会的,请不要拒绝这个问题。

【问题讨论】:

标签: angularjs ng-tags-input


【解决方案1】:

我不知道你是否已经解决了这个问题,但我正在做的是:

模板.html

<tags-input name="developer" ng-model="developer" placeholder="designer" 
class="tagDev"></tags-input>

css

.tagDev .tags .tag-item{
background: (color) !important;
color: white;
border: 1px solid (color);
}

希望有用!

如果你想做更多的标签输入,只需使用 class 和 .class .tags。标记项{样式}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-11-23
    • 1970-01-01
    • 1970-01-01
    • 2016-07-22
    • 2016-05-20
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多