MDN self-hosted library · e01.org

`:-moz-window-inactive` CSS pseudo-class

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

css
:-moz-window-inactive {
  /* ... */
}
html
<div id="my-box">
  <p>This is a box!</p>
</div>
css
#my-box {
  background: linear-gradient(to bottom, yellow, cyan);
  width: 200px;
  height: 200px;
}

#my-box:-moz-window-inactive {
  background: cyan;
}