【发布时间】:2015-01-10 08:31:34
【问题描述】:
我目前正在使用 Bootstrap 3 弹出框功能来显示单击按钮时的图例
图例是一个图像文件,我想在弹出窗口中显示该图像
但是图像宽度超出了弹出窗口的宽度
即使给出 width 属性也不会改变弹出窗口的宽度。
非常感谢您的帮助。
HTML
<button id="btnLegend" class="btn btn-warning" data-toggle="popover">Legend</button>
Javascript
$(function () {
$('#btnLegend').popover(
{'placement':'bottom',
'content':"<img src=\"http://www.hopkinsmn.com/about/img/map-legend.gif\" alt=\"legend\">",
'title':'Popup Test',
'html':true,
'container':'body'
}
);
});
这是我的fiddle
【问题讨论】:
标签: javascript html css twitter-bootstrap