tooltip背景色修改
<p>tooltip默认黑色背景修改成蓝色背景
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=3a7ef6eef8b5ee0691efb5cf0401c0a6&amp;file=file.png" alt="" /></p>
<pre><code> &lt;style&gt;
.tooltip-inner {
background-color: #007bff !important; /* 使用Bootstrap蓝色 */
color: #ffffff !important; /* 可选:调整文字颜色为白色 */
}
.bs-tooltip-top .tooltip-arrow::before {
border-top-color: #007bff !important;
}
.bs-tooltip-bottom .tooltip-arrow::before {
border-bottom-color: #007bff !important;
}
&lt;/style&gt;
&lt;div class=&quot;mt-5&quot; style=&quot; &quot;&gt;&lt;/div&gt;
&lt;div class=&quot;container&quot;&gt;
&lt;button class=&quot;btn btn-primary&quot; title=&quot;测试提示框&quot; data-bs-toggle=&quot;tooltip&quot;&gt;按钮&lt;/button&gt;
&lt;/div&gt;
&lt;script&gt;
var tooltipTriggerList = [].slice.call(document.querySelectorAll(&#039;[data-bs-toggle=&quot;tooltip&quot;]&#039;))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
&lt;/script&gt;</code></pre>