data-tooltip 新增其他位置定位

This commit is contained in:
liaoxuezhi 2019-07-09 16:29:48 +08:00
parent fffc0455b9
commit 3d191ecead

View File

@ -211,6 +211,28 @@
margin: $Tooltip--attr-gap 0 0 0;
}
&[data-position="left"]:after {
top: 50%;
right: 100%;
left: auto;
transform: translateY(-50%);
}
&[data-position="left"]:hover:after {
margin: 0 0 0 $Tooltip--attr-gap;
}
&[data-position="top"]:after {
left: 50%;
top: auto;
bottom: 100%;
transform: translateX(-50%);
}
&[data-position="top"]:hover:after {
margin: -$Tooltip--attr-gap 0 0 0;
}
&:hover:active:after {
content: "";
display: none !important;