我需要在用户的ui中选择一个Bootstrap 3 glyphicons子集.
我试过这个:
<select class="form-control"> <option><span class="glyphicon glyphicon-cutlery"></span></option> <option><span class="glyphicon glyphicon-eye-open"></span></option> <option><span class="glyphicon glyphicon-heart-empty"></span></option> <option><span class="glyphicon glyphicon-leaf"></span></option> <option><span class="glyphicon glyphicon-music"></span></option> <option><span class="glyphicon glyphicon-send"></span></option> <option><span class="glyphicon glyphicon-star"></span></option> </select>
然而,我得到的都是空行.任何帮助或替代建议赞赏.
解决方法
我认为标准的HTML选择不会显示HTML内容.我建议检查Bootstrap选择:
http://silviomoreto.github.io/bootstrap-select/
<select id="mySelect" data-show-icon="true"> <option data-content="<i class='glyphicon glyphicon-cutlery'></i>">-</option> <option data-subtext="<i class='glyphicon glyphicon-eye-open'></i>"></option> <option data-subtext="<i class='glyphicon glyphicon-heart-empty'></i>"></option> <option data-subtext="<i class='glyphicon glyphicon-leaf'></i>"></option> <option data-subtext="<i class='glyphicon glyphicon-music'></i>"></option> <option data-subtext="<i class='glyphicon glyphicon-send'></i>"></option> <option data-subtext="<i class='glyphicon glyphicon-star'></i>"></option> </select>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。