【发布时间】:2014-06-03 02:21:38
【问题描述】:
我有一个工具提示在响应表中。但是,我意识到工具提示中的文本并没有很好地仅在移动视图中包装它。
请在此处查看示例:http://www.bootply.com/4fFLE90WAl# 您需要渲染移动视图和鼠标悬停并查看问题
【问题讨论】:
标签: css twitter-bootstrap mobile tooltip
我有一个工具提示在响应表中。但是,我意识到工具提示中的文本并没有很好地仅在移动视图中包装它。
请在此处查看示例:http://www.bootply.com/4fFLE90WAl# 您需要渲染移动视图和鼠标悬停并查看问题
【问题讨论】:
标签: css twitter-bootstrap mobile tooltip
将此添加到您的 CSS
.tooltip-inner {
white-space:pre; /* you can also try white-space: normal; */
max-width:none;
}
它会像魅力一样发挥作用。他们这里的关键属性是white-space。了解更多信息here
【讨论】:
我通过添加这一行“data-container="body"
解决了这个问题现在看起来是这样的
<a href="#" data-toggle="tooltip" data-container="body" data-placement="right" data-html="true" title="this paragraph is too long and the text does not wrap around in mobile view, i don't know why this is happening. please help">Hover over me</a>
没事吧?还是Hristo提供的解决方案更好?
【讨论】:
![.tooltip-inner{white-space:normal;}][1]
【讨论】: