Repeat Text as a Background Image in CSS Using element()

👨‍🔬 Experimental technology: Firefox only …

Using the element() CSS function it’s possible to recreate album covers that contain repeated text, such as “The Life of Pablo”.

.target {
  background-image: -moz-element(#id_of_an_element_to_use_as_the_background);
}

Ollie Williams lays it all out on CSS-Tricks.

How to Repeat Text as a Background Image in CSS Using element()

📸 Back in 2013 I’ve experimented with element() to recreate the <marquee> element. The alternate and slide variants still work fine, but looks like the left/right/down/up variants could need some polishing for them to work fine again.

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.