|
| 1 | + |
| 2 | +/* |
| 3 | + tooltip |
| 4 | +*/ |
| 5 | +[data-tooltip] { |
| 6 | + position: relative; |
| 7 | + z-index: 2; |
| 8 | +} |
| 9 | + |
| 10 | +[data-tooltip]:before, |
| 11 | +[data-tooltip]:after { |
| 12 | + visibility: hidden; |
| 13 | + opacity: 0; |
| 14 | +} |
| 15 | + |
| 16 | +[data-tooltip]:before { |
| 17 | + background-color: rgba(0, 0, 0, 0.95); |
| 18 | + border-radius: 3px; |
| 19 | + margin-bottom: 5px; |
| 20 | + margin-left: -50px; |
| 21 | + text-align: center; |
| 22 | + min-width: 100px; |
| 23 | + font-size: 1em; |
| 24 | + position: absolute; |
| 25 | + content: attr(data-tooltip); |
| 26 | + padding: 5px; |
| 27 | + bottom: 120%; |
| 28 | + color: #fff; |
| 29 | + left: 50%; |
| 30 | +} |
| 31 | + |
| 32 | + |
| 33 | +[data-tooltip]:after { |
| 34 | + border-right: 5px solid transparent; |
| 35 | + border-left: 5px solid transparent; |
| 36 | + margin-left: -5px; |
| 37 | + line-height: 0; |
| 38 | + border-top: 5px solid rgba(0, 0, 0, 0.95); |
| 39 | + font-size: 0; |
| 40 | + position: absolute; |
| 41 | + content: " "; |
| 42 | + bottom: 120%; |
| 43 | + width: 0; |
| 44 | + left: 50%; |
| 45 | +} |
| 46 | + |
| 47 | +[data-tooltip]:hover:before, |
| 48 | +[data-tooltip]:hover:after { |
| 49 | + visibility: visible; |
| 50 | + opacity: 1; |
| 51 | +} |
0 commit comments