【发布时间】:2020-06-10 20:13:15
【问题描述】:
我有一个 ng-options 多选列表,我试图在带有 ::before 类的选项文本之前附加一些图标。这在 chrome 中很有效,但在 Firefox 中无效。 ::before 上的内容似乎抹去了选项文本。
.optionClass:before{
content:"::before "
}
<select multiple="multiple">
<option class="optionClass">first</option>
<option class="optionClass" label="sec" >second</option>
</select>
我希望同时看到“第一”和“第二”,但在 FF 中我只能看到第一。 “second”的文本被隐藏了。
再一次,这在 Chrome 中完美运行,但在 Firefox 中却不行。
有没有办法只用 css 解决这个问题?如果没有,有没有办法在将 ng-options 与 AngularJs 1.x 一起使用时将标签元素从选项中移除?
【问题讨论】: