🍋
Menu
CSS

Pseudo-class

CSS Pseudo-class

A keyword added to selectors targeting elements in a specific state (e.g. :hover, :focus, :nth-child).

Detail Teknis

CSS Pseudo-classs animate property changes over a specified duration using easing functions (ease, linear, cubic-bezier). Only animatable properties can transition — layout properties like display and grid-template cannot. Performance-critical transitions should target transform and opacity, which run on the compositor thread without triggering layout recalculation. The will-change property hints the browser to optimize for upcoming transitions by promoting elements to their own compositing layer.

Contoh

```css
/* Example: Pseudo-class */
.element {
  /* Apply pseudo class to this element */
  display: block;
  margin: 0 auto;
}
```

Alat Terkait

Istilah Terkait