[英]CSS is not applied to Custom Tooltips's arrow
我正在使用ReactTooltip
<ReactTooltip className={styles.customTheme} id={id} place={placement} effect="solid">
{children}
</ReactTooltip>
.customTheme {
color: #ff6e00 !important;
background-color: orange !important;
&.place-top {
&::after {
border-top: 6px solid orange !important;
}
}
}
箭头颜色未按预期更改。
您还可以在 html 标签中使用“title”,如 Name:" <input type="text" title="enter name" />
你很接近。 你的 SCSS 只需要::before
伪选择器。
.customTheme {
background-color: #ff6e00 !important;
border: 1px solid;
&.place-top {
&::before, &::after {
border-top: 8px solid #ff6e00!important;
}
}
请注意,您应该只能在组件上使用backgroundColor
和/或arrowColor
道具,但它们不起作用: https : //github.com/wwayne/react-tooltip/issues/594
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.