CSS Pseudo Element Decorations
Create decorative elements using CSS pseudo-elements with content and positioning for tooltips badges and icons.
Code
.tooltip::after {
content: attr(data-tooltip);
position: absolute;
bottom: 100%;
background: #1a1a2e;
color: white;
padding: 4px 8px;
border-radius: 4px;
white-space: nowrap;
}Report a problem with this exampleOpens a pre-filled issue on GitHub.