引导程序5:如何在工具提示上实现渐变色



我在bootstrap 5工具提示上尝试渐变颜色时遇到了一些问题

CSS:

.tooltip .tooltip-arrow::before {
position: absolute;
content: "";
border-color: transparent;
border-style: solid;
}
.bs-tooltip-top .tooltip-arrow::before, 
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
top: -1px;
border-width: 0.4rem 0.4rem 0;
border-top-color: #000;
}

实时示例:https://codepen.io/themes4all/pen/NWabvad

通过添加.bg渐变类,可以将线性渐变作为背景图像添加到背景中。或者,要使用渐变背景色,需要将$enable gradients属性设置为true。默认情况下,它设置为false。请参阅链接以了解更多信息https://www.geeksforgeeks.org/colors-and-gradients-in-bootstrap-with-examples/https://getbootstrap.com/docs/5.0/utilities/background/

最新更新