:current CSS pseudo-selector

:current CSS pseudo-selector

:current is a CSS pseudo-selector that matches an element or an ancestor of an element that’s currently in display.

It’s a lot like is() in that sense. But what makes this pseudo-selector interesting is that it’s part of what the CSS Selectors Level 4 specification calls “time dimensional” pseudo-classes which are designed to match elements along a timeline, such as subtitles in a video.

This is all very conceptual at the moment. The spec itself is in Working Draft status. That means :current has been defined, but there’s very little support for it and what we have now is subject to change by the time it.

要查看或添加评论,请登录

Milap Patel的更多文章

社区洞察

其他会员也浏览了