-
Notifications
You must be signed in to change notification settings - Fork 15
/
tooltip.css
35 lines (32 loc) · 1.2 KB
/
tooltip.css
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
33
34
35
.tooltip {
position: absolute;
padding: .8em 1em;
top: 10px; /* Defines the spacing between tooltip and target position */
max-width: 200px;
color: #fff;
background: #3a3c47;
border-radius: 2px;
text-shadow: -1px -1px 0 rgba(0,0,0,.2);
}
/* Arrow styles */
.tooltip:after {
content: '';
position: absolute;
width: 10px;
height: 10px;
margin: -5px;
background: inherit;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.tooltip.top:after, .tooltip.top-left:after, .tooltip.top-right:after { bottom: 0; }
.tooltip.bottom:after, .tooltip.bottom-left:after, .tooltip.bottom-right:after { top: 0; }
.tooltip.top:after, .tooltip.bottom:after { left: 50%; }
.tooltip.top-left:after, .tooltip.bottom-left:after { right: 15px; }
.tooltip.top-right:after, .tooltip.bottom-right:after { left: 15px; }
.tooltip.left:after, .tooltip.left-top:after, .tooltip.left-bottom:after { right: 0; }
.tooltip.right:after, .tooltip.right-top:after, .tooltip.right-bottom:after { left: 0; }
.tooltip.left:after, .tooltip.right:after { top: 50%; }
.tooltip.left-top:after, .tooltip.right-top:after { bottom: 15px; }
.tooltip.left-bottom:after, .tooltip.right-bottom:after { top: 15px; }