Overlays
Tooltip Fade In
A tooltip that rises a few pixels and fades in, fast enough to feel instant.
Opens with this animation loaded. Nothing is uploaded — the scene travels in the link.
.tooltip {
transform: translate3d(176px, 143px, 0);
box-shadow: 0px 4px 14px 0px #00000066;
width: 128px;
height: 34px;
background: #05060a;
border-radius: 8px;
color: #e7e9ee;
font-size: 12px;
font-weight: 500;
animation: tooltip-anim 1200ms linear 0ms infinite both;
will-change: transform, opacity;
}
@keyframes tooltip-anim {
0% {
transform: translate3d(176px, 149px, 0);
opacity: 0;
animation-timing-function: ease-out;
}
13.33% {
transform: translate3d(176px, 143px, 0);
opacity: 1;
}
100% {
transform: translate3d(176px, 143px, 0);
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.tooltip {
animation: none;
transition: none;
}
}Why it is built this way
Tooltips need to feel instant: about 150ms with a 6px rise. Any real distance or duration makes the interface feel like it is thinking, and tooltips are supposed to answer a question you already had.
What it animates
2 properties across 2 CSS declarations. The bar shows when each one is moving.
opacitytransformWhat it costs to run
Opacity and y are handled by the compositor: no layout, no repaint, and the work can run off the main thread. This is the cheap end of CSS animation, which is why it stays smooth on a slow phone where other properties will not.
It runs for 1.20s across 4 keyframe stops, with every property moving over the same window.
One curve throughout: Ease Out on a button. Keeping a single easing across every property is what makes a multi-property animation read as one movement rather than several things happening at once.
Accessibility
Starting at opacity 0 makes the reduced-motion guard load-bearing rather than polite: strip it and a reader who asked for less movement gets no content at all, because nothing ever fades it in. It fades over 1.20s alongside y, and the guard skips all of it together. The generated CSS ends on the resting state, so skipping straight there is safe.