【问题标题】:Changing the position of a specific tooltip更改特定工具提示的位置
【发布时间】:2015-10-08 14:37:12
【问题描述】:

我正在使用 Twitter Bootstrap 及其工具提示,并且有一个与 this one 类似的问题,即我想更改工具提示的位置。

但是,就我而言,我不想更改所有工具提示的位置,而只想更改下面的一个(我想将工具提示向左移动 30 像素)。

<i data-placement="left" title="{% trans "View the tool menu" %}" data-original-title="{% trans "View the tool menu" %}"
class='tooltip-hover menu-handle sprite-io sprite-control2'></i>

这怎么可能?

【问题讨论】:

标签: css twitter-bootstrap tooltip


【解决方案1】:

这会更改所有放置在左侧的工具提示的位置。

[data-placement=left] + .tooltip .tooltip-inner, 
[data-placement=left] + .tooltip .tooltip-arrow { margin-right:30px; }

如果您只想更改此元素,请给它一个类或 id。 例如:

#dummy + .tooltip .tooltip-inner, 
#dummy + .tooltip .tooltip-arrow { margin-right:30px; }

【讨论】:

    猜你喜欢
    • 2015-01-03
    • 2017-02-05
    • 1970-01-01
    • 2020-08-12
    • 1970-01-01
    • 2013-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多