MDN self-hosted library · e01.org

`:-moz-last-node` 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-last-node {
  /* ... */
}
html
<p>
  <span>This does not match.</span>
  <span>This matches!</span>
</p>

<p>
  <span>This doesn't match because it's followed by text.</span>
  Blahblah.
</p>
css
span:-moz-last-node {
  background-color: lime;
}