我正在尝试创建一个选择框,显示所有Twitter Bootstrap图标及其文本。因此我使用的是Bootstrap-Select Plugin。其中一个图像显示在列表中,但其余部分以某种方式隐藏。
为了获取所有列出的图标及其文本列表,我需要更改哪些内容?
JS:
<script src="source/bootstrap_select/bootstrap-select.js" type="text/javascript"></script>
<script type="text/javascript">
$( document ).ready(function() {
$('.selectpicker').selectpicker('');
});
</script>
HTML:
<select class="selectpicker">
<option data-icon="icon-search">icon-search</option>
<option data-icon="icon-envelope">icon-envelope</option>
<option data-icon="icon-heart" selected="selected">icon-heart</option>
<option data-icon="icon-star">icon-star</option>
<option data-icon="icon-star-empty">icon-star-empty</option>
<option data-icon="icon-user">icon-user</option>
<option data-icon="icon-film">icon-film</option>
<option data-icon="icon-th-large">icon-th-large</option>
<option data-icon="icon-th">icon-th</option>
<option data-icon="icon-th-list">icon-th-list</option>
<option data-icon="icon-ok">icon-ok</option>
<option data-icon="icon-remove">icon-remove</option>
<option data-icon="icon-zoom-in">icon-zoom-in</option>
<option data-icon="icon-zoom-out">icon-zoom-out</option>
<option data-icon="icon-off">icon-off</option>
<option data-icon="icon-signal">icon-signal</option>
<option data-icon="icon-cog">icon-cog</option>
<option data-icon="icon-trash">icon-trash</option>
<option data-icon="icon-home">icon-home</option>
<option data-icon="icon-file">icon-file</option>
<option data-icon="icon-time">icon-time</option>
<option data-icon="icon-road">icon-road</option>
<option data-icon="icon-download-alt">icon-download-alt</option>
<option data-icon="icon-download">icon-download</option>
<option data-icon="icon-upload">icon-upload</option>
<option data-icon="icon-inbox">icon-inbox</option>
<option data-icon="icon-play-circle">icon-play-circle</option>
<option data-icon="icon-repeat">icon-repeat</option>
<option data-icon="icon-refresh">icon-refresh</option>
<option data-icon="icon-list-alt">icon-list-alt</option>
<option data-icon="icon-lock">icon-lock</option>
<option data-icon="icon-flag">icon-flag</option>
<option data-icon="icon-headphones">icon-headphones</option>
<option data-icon="icon-glass">icon-glass</option>
<option data-icon="icon-music">icon-music</option>
</select>
答案 0 :(得分:0)
<link href="source/bootstrap_select/bootstrap-select.css" media="screen" rel="stylesheet" type="text/css" />
失踪了!