-
Notifications
You must be signed in to change notification settings - Fork 0
/
tooltip.css
83 lines (75 loc) · 1.3 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* Tooltip.js is a lightweight javascript plugin for responsive and
* easy to use tooltips.
*
* @version 1.0
* @author Jakob Ploens <[email protected]>
* @copyright Jakob Ploens 2016
* @license The MIT License
*/
/**
* Settings
*
*/
/**
* Don't change following lines till line 42.
* These are the most important ones.
*
*/
.tooltip {
opacity: 0;
position: absolute;
z-index: 10000;
}
.tooltip--fixed {
position: fixed;
}
.tooltip--is-shown {
opacity: 1;
}
/**
* Here you go – our theme. Adjust like you want it to look like.
*/
.tooltip {
background: #000;
color: #fff;
text-align: center;
max-width: 30em;
padding: 0.5em 1em;
border-radius: 2px;
-webkit-transition: opacity .1s;
transition: opacity .1s;
}
/**
* Defining the caret.
*/
.tooltip::after {
content: '';
position: absolute;
left: 50%;
width: 0;
height: 0;
border-left: 0.5em solid transparent;
border-right: 0.5em solid transparent;
border-top: 0.5em solid #000;
margin-left: -0.5em;
bottom: -0.5em;
}
.tooltip--bottom::after {
border-top: none;
border-bottom: 0.5em solid #000;
top: -0.5em;
bottom: auto;
}
.tooltip--left {
margin-left: -1.25em;
}
.tooltip--left::after {
left: 1.25em;
margin: 0;
}
.tooltip--right::after {
right: 1.25em;
margin: 0;
left: auto;
}