如何使用Twitter Bootstrap中的popover显示图像?(How do I use popover from Twitter Bootstrap to display an image?)
Twitter Bootstrap的popover功能的典型例子是具有标题的类固醇的工具提示。
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显示图像。 这可能吗?
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>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 });http://jsfiddle.net/weuWk/
Very simple :)
<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 });http://jsfiddle.net/weuWk/
更多推荐
popover,title,HTML,Twitter,<a,电脑培训,计算机培训,IT培训"/> <meta name=&q
发布评论