我使用Twitter Bootstrap创建了一个工具提示。
工具提示显示为三行。但是,我想只显示一行的工具提示。
如何更改工具提示的宽度?这是针对Twitter Bootstrap还是针对工具提示本身?
发布于 2013-05-27 16:07:47
只需覆盖bootstrap.css
BS2中的默认值是max-width:200px;因此您可以根据需要增加它。
.tooltip-inner {
max-width: 350px;
/* If max-width does not work, try using width instead */
width: 350px;
}
发布于 2014-02-09 08:47:27
在BS3上
.tooltip-inner {
min-width: 150px; /* the minimum width */
}
发布于 2014-11-19 18:03:15
用"important!“定义最大宽度并使用data-container="body“
CSS文件
.tooltip-inner {
max-width: 500px !important;
}
HTML标签
<a data-container="body" title="Looooooooooooooooooooooooooooooooooooooong Message" href="#" class="tooltiplink" data-toggle="tooltip" data-placement="bottom" data-html="true"><i class="glyphicon glyphicon-info-sign"></i></a>
JS脚本
$('.tooltiplink').tooltip();
https://stackoverflow.com/questions/14596743
复制相似问题