Skip to main content
100%

Gist d97664b2ce981894f755

✓ Published0🌍 Public
Aallilevine
Last edited Jul 13, 2015
Created on Jul 11, 2015

This example demonstrates how to assign a random background image to the `#content` element from a generated list of 40 image file names. It uses Sass to construct an array of image paths with a `@for` loop, appending each file name to the array, then selects a random index with the `random()` function. The chosen image is applied via a CSS `background` property with a cover size, relying on Sass’s `append`, `nth`, and `length` functions rather than any JavaScript or external library.

AI-generated description

Similar vizzes