实现效果:
其实有个关键点:
data-container="body" data-html="true" 注意下就可以了
<button type="button" class="btn btn-success" title="Popover title"
data-container="body" data-html="true" data-toggle="popover" data-placement="bottom"
data-content=‘
<div id="popover-content"> <form role="form" method="post"> <div class="form-group"> <label>Start time?</label> <div class="input-group date" id="datetimepicker1"> <input type="text" class="form-control" placeholder="Start Date time of event" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <div class="form-group"> <label>End time?</label> <div class="input-group date" id="datetimepicker2"> <input type="text" class="form-control" placeholder="End Date time" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <div class="form-group"> <button class="btn btn-primary btn-block">Search between dates</button> </div> </form> </div>
‘>
底部的 Popover
</button>
要是没加 data-container="body" data-html="true" ,那就这样了:
原文地址:http://blog.51cto.com/ipcpu/2178601
时间: 2024-10-13 09:24:42