data-tooltip 去掉默认内容显式

This commit is contained in:
liaoxuezhi 2019-11-13 14:46:47 +08:00
parent e61b4c09d2
commit 1b2027823a
1 changed files with 15 additions and 3 deletions

View File

@ -166,6 +166,14 @@
} }
} }
@keyframes tooltipIn {
from {
opacity: 0;
margin: 0;
}
}
[data-tooltip] { [data-tooltip] {
position: relative; position: relative;
@ -187,11 +195,15 @@
left: 100%; left: 100%;
color: $Tooltip--attr-color; color: $Tooltip--attr-color;
padding: $Tooltip--attr-paddingY $Tooltip--attr-paddingX; padding: $Tooltip--attr-paddingY $Tooltip--attr-paddingX;
opacity: 0; display: none;
transition: $Tooltip--attr-transition; animation-duration: 0.2s;
animation-fill-mode: both;
} }
&:not(.is-disabled):hover:after { &:not(.is-disabled):hover:after {
display: inline-block;
animation-name: tooltipIn;
opacity: 1; opacity: 1;
z-index: $zindex-tooltip; z-index: $zindex-tooltip;
margin: 0 0 0 $Tooltip--attr-gap; margin: 0 0 0 $Tooltip--attr-gap;
@ -234,4 +246,4 @@
content: ''; content: '';
display: none !important; display: none !important;
} }
} }