【问题标题】:Image inside bootstrap tool tip not working引导工具提示中的图像不起作用
【发布时间】:2017-07-21 14:34:06
【问题描述】:

我在 echo..

中有这个简单的工具提示
echo '<a data-toggle="tooltip" title="<img src=http://cjrtec.com/dist/img/undersold.png/> "><img src="http://cjrtec.com/dist/img/guarantee-best-price.jpg" alt="guarantee best price" class="img-responsive guarantee-best-price" style="float: left;" /></a>';

我的问题是我无法显示图像..

我尝试将元素与另一个 echo 分开,但没有奏效。

我不知道如何处理这个多引号。

谢谢

【问题讨论】:

  • 标题图片上的src 周围没有引号:&lt;img src=http://cjrtec.com/dist/img/undersold.png/&gt;。解决这个问题能解决你的问题吗?当然,您需要转义引号,因为您已经同时使用了单引号和双引号:)
  • 是的,我将其删除,因为它仍然无法正常工作...我会尝试的
  • 我认为它可以正常工作.. 可能是浏览器.. 当我将鼠标悬停在图片上时,它会显示链接 http://cjrtec.com/dist/img/undersold.png 而不是图片

标签: php html twitter-bootstrap


【解决方案1】:

这个问题可能对你有所帮助--

Image in tooltip using bootstrap?

This is the fiddle used in this question

<div class="cart"> 
<a data-toggle="tooltip" title="<img src='http://getbootstrap.com/apple- 
touch-icon.png' />">
    <i class="icon-shopping-cart"></i>
  </a>
  </div>

$('a[data-toggle="tooltip"]').tooltip({
animated: 'fade',
placement: 'bottom',
html: true
});

The maniputed fiddle

【讨论】:

    猜你喜欢
    • 2013-11-06
    • 1970-01-01
    • 1970-01-01
    • 2013-08-24
    • 2014-01-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多