【发布时间】:2018-02-21 18:54:33
【问题描述】:
一直在使用 Bootstrap Selectpicker,但是当我将数据内容添加到数据子文本以突出显示颜色的选择时,子文本消失了。尝试了各种方式,但潜台词仍然从下拉列表中消失。有什么想法或解决方法吗?
请原谅缺少代码,我的所有东西都在本地运行,因为我的慢速宽带与 CDN 相冲突。
<select class="selectpicker" data-style="btn-light" data-width="100%" multiple data-max-options="2">
<option data-content="<span class='label label-success'>Choice1</span>" data-subtext="Subtext1">Choice1</option>
<option data-content="<span class='label label-info'>Choice2</span>" data-subtext="Subtext2">Choice2</option>
<option data-content="<span class='label label-warning'>Choice3</span>" data-subtext="Subtext3">Choice3</option>
</select>
【问题讨论】:
-
是的,我有一个想法:Edit 你的问题并通过点击 "JavaScript/HTML/ 在底部发布你的完整当前
code snippetCSS sn-p" 图标。
标签: bootstrap-4 bootstrap-selectpicker