我有一个弹出窗口,当您将鼠标悬停在信用卡上时,它会告诉您信用卡的 CVV 代码在哪里。问题是默认文本太大,我似乎找不到在哪里缩小它。
我的html是:
<div
class="sprite_icons icon_creditcard_code"
data-trigger="hover"
aria-hidden="true"
data-toggle="popover"
data-placement="right"
title="Security Code"
data-content="This is the text I want to change i'ts really long, longer than this.
>
</div>
虽然我认为如果我添加 CSS 类是行不通的,但我会向您展示它以防万一:
.sprite_icons {
float: left;
background-image: url(/static/img/sprite_icons.png);
background-repeat: no-repeat;
}
.icon_creditcard_code {
width: 32px;
height: 20px;
background-position: -64px -104px;
}
最佳答案
您可以通过更改工具提示所使用的 .tooltip
类的 font-size
来修改文本大小。
示例:
.tooltip{
font-size: 3rem;
}
关于javascript - 如何自定义 Bootstrap 工具提示弹出框的文本字体大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52336559/