property
View timeline axis — CSS reference
Selects the axis along which the subject crosses the scrollport for a named view timeline. Logical axes follow writing mode.
Formal Syntax & Structure
css syntaxcss
view-timeline-axis: block;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>view-timeline-axis</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#s{width:240px;height:100px;overflow:auto}#a{height:40px;padding:0;animation:fade auto linear both;animation-timeline:view(block)}@keyframes fade{from{opacity:0}to{opacity:1}}#a{view-timeline-name:--subject;view-timeline-axis:block;animation-timeline:--subject}@media(prefers-reduced-motion:reduce){#a{animation:none;opacity:1}}</style><body><div id="s" tabindex="0" aria-label="Scrollable demonstration"><div style="height:200px"></div><div id="a">Subject</div><div style="height:300px"></div></div></body></html>