BootStrape工具提示更改颜色

时间:2020-05-24 19:34:24

标签: html css bootstrap-4

我想更改BootStrap工具提示的颜色,并使文本保持左对齐。我检查了其他帖子,但没有任何CSS更改对我有用。我想知道如何更改工具提示文本消息的CSS?

工具提示的HTML代码:

<button type="button" class="btn btn-lg btn-info bottom-right-2" data-html="true" 
data-toggle="tooltip" data-placement="left" title="text text">

1 个答案:

答案 0 :(得分:0)

首先,请确保按钮左侧的空间足以容纳工具提示。否则,它将放置在右侧。

更改颜色

|-------+-------+--------+----+--------|
| id    | col1  | col2   | .. | col100 |
|-------+-------+--------+----+--------|
| 2346a | apple | green  |    | WA     |
| d27d7 | pear  | green  |    | VA     |
| 568ba | lemon | yellow |    | CA     |
| 9896f | plum  | purple |    | CA     |
| 1b7da | peach | pink   |    | GA     |
|-------+-------+--------+----+--------|

请查看工具提示的引导程序标记:https://getbootstrap.com/docs/4.5/components/tooltips/#markup

请参见示例: https://jsfiddle.net/au4pjwf6/