我创建了一个左右箭头图标,其中包含yes和no文本,但是在箭头图标旁边显示。现在我的任务是插入内嵌箭头图标的文本。
<div class="modal fade" id="modal" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content login-modal">
<div class="modal-header login-modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title text-center" id="modallabel">Confirm</h4>
</div>
<div class="modal-body">
<div class="text-center">
<div role="tabpanel" class="login-tab">
<div class="tab-content">
<br />
<label for="NO">NO</label>
<i class=" pull-right glyphicon glyphicon-arrow-left"></i>
<label for="YES">YES</label>
<i class="pull-right glyphicon glyphicon-arrow-right"></i>
</div>
</div>
</div>
</div>
</div>
</div>
答案 0 :(得分:0)
您必须将箭头放在具有相对位置的容器内。然后将箭头位置设置为绝对值。并将它们放在你想要的地方。像这样的东西会起作用......
<label for="NO" style="position:relative;">
<i class="pull-right glyphicon glyphicon-arrow-left" style="position:absolute; top:0; left:0;"></i>
NO</label>