【发布时间】:2021-01-12 20:28:21
【问题描述】:
我创建了一个工具提示,需要为其设置边框颜色,但它给了我一个错误 下图供参考。
工具提示代码
.mytooltip {
position: absolute;
padding: 5px;
border: 1px solid gray;
background-color: #ffffff;
color: $color-black;
min-width: 50px;
opacity: 0;
transition-property: opacity, transform;
transform-origin: center center;
text-align: center;
&:after {
border: 1px solid;
border-width: 6px;
content: '';
height: 0;
position: absolute;
width: 0;
}
}
底部方向码
.mytooltip--bottom {
transform: translate(-50%, 15px) scale(0);
&:after {
border-color: black;
border-bottom-color: #ffffff;
bottom: 100%;
left: 50%;
margin-left: -6px;
}
}
请帮我解决这个问题
【问题讨论】:
-
能否也添加相关的HTML代码?
-
我正在使用 react js