本文介绍了如何使用Twitter Bootstrap中的popover来显示图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Twitter Bootstrap的popover功能的典型示例是带有标题的类固醇的工具提示。
The canonical example for Twitter Bootstrap's popover feature is sort of a tooltip on steroids with a title.
HTML:
<a href="#" id="blob" class="btn large primary" rel="popover" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A title">hover for popover</a>
JS:
<script>
$("#blob").popover({offset: 10});
</script>
我想使用popover来显示图像。这可能吗?
I'd like to use popover to display an image. Is this possible?
推荐答案
很简单:)
<a href="#" id="blob" class="btn large primary" rel="popover">hover for popover</a>
var img = '<img src="https://si0.twimg.com/a/1339639284/images/three_circles/twitter-bird-white-on-blue.png" />';
$("#blob").popover({ title: 'Look! A bird!', content: img, html:true });
这篇关于如何使用Twitter Bootstrap中的popover来显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!