MDN self-hosted library · e01.org

Using multiple backgrounds

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

html
<div class="multi-bg-example"></div>
css
.multi-bg-example {
  width: 100%;
  height: 400px;
  background-image:
    url("firefox.png"), url("bubbles.png"),
    linear-gradient(to right, rgb(30 75 115 / 100%), transparent);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position:
    bottom right,
    left,
    right;
}
css
.element {
  background-image: url("a.png"), url("b.png"), url("c.png");
  background-position: left top;
}
css
.element {
  background-position:
    left top,
    left top,
    left top;
}