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 84 85 86
| [aria-label][balloon-shown] { position: relative; } [aria-label][balloon-shown="left"]::before { border: 5px solid transparent; border-left-color: #202335; } [aria-label][balloon-shown="right"]::before { border: 5px solid transparent; border-right-color: #202335; } [aria-label][balloon-shown="up"]::before { border: 5px solid transparent; border-top-color: #202335; } [aria-label][balloon-shown="down"]::before { border: 5px solid transparent; border-bottom-color: #202335; } [aria-label][balloon-shown]::before { width: 0; height: 0; z-index: 10; content: ""; position: absolute; opacity: 0; visibility: hidden; transition: opacity .4s, transform .4s, visibility .4s; } [aria-label][balloon-shown]::after { opacity: 0; z-index: 10; visibility: hidden; background-color: #202335; content: attr(aria-label); white-space: nowrap; border-radius: 2px; position: absolute; padding: .5em 1em; transition: opacity .4s, transform .4s, visibility .4s; color: #eee; } [aria-label][balloon-shown]:hover::after, [aria-label][balloon-shown]:hover::before { opacity: 0.9; visibility: visible; } [aria-label][balloon-shown="left"]::after { margin-right: 10px; } [aria-label][balloon-shown="left"]::after, [aria-label][balloon-shown="left"]::before { right: 100%; top: 50%; transform: translate(5px, -50%); } [aria-label][balloon-shown="right"]::after { margin-left: 10px; } [aria-label][balloon-shown="right"]::after, [aria-label][balloon-shown="right"]::before { left: 100%; top: 50%; transform: translate(-5px, -50%); } [aria-label][balloon-shown="left"]:hover::after, [aria-label][balloon-shown="left"]:hover::before, [aria-label][balloon-shown="right"]:hover::after, [aria-label][balloon-shown="right"]:hover::before { transform: translate(0, -50%); } [aria-label][balloon-shown="up"]::after { margin-bottom: 10px; } [aria-label][balloon-shown="up"]::after, [aria-label][balloon-shown="up"]::before { bottom: 100%; left: 50%; transform: translate(-50%, 5px); } [aria-label][balloon-shown="down"]::after { margin-top: 10px; } [aria-label][balloon-shown="down"]::after, [aria-label][balloon-shown="down"]::before { left: 50%; top: 100%; transform: translate(-50%, -5px); } [aria-label][balloon-shown="up"]:hover::after, [aria-label][balloon-shown="up"]:hover::before, [aria-label][balloon-shown="down"]:hover::after, [aria-label][balloon-shown="down"]:hover::before { transform: translate(-50%, 0); }
|