forked from jgthms/css-reference
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathtooltip.sass
More file actions
32 lines (29 loc) · 705 Bytes
/
Copy pathtooltip.sass
File metadata and controls
32 lines (29 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[data-tooltip]
position: relative
[data-tooltip]:before
background-color: $text-strong
border-radius: 2px
bottom: 100%
color: #fff
content: attr(data-tooltip)
font-family: $family-primary
font-size: 0.6rem
left: 50%
line-height: 1.2
opacity: 0
padding: 0.5em 0.6em
pointer-events: none
position: absolute
text-align: center
transform: translateX(-50%) translateY(0)
transition-duration: $speed
transition-property: opacity, transform
visibility: hidden
white-space: nowrap
[data-tooltip]:hover:before
opacity: 1
transform: translateX(-50%) translateY(-4px)
visibility: visible
[data-tooltip].is-copied:before
background: $green
content: "已复制!"