Jump to content

Page Refresh = Random Image on Site Header

Recommended Posts

Hi There,

I'd like a random image to load in my site header each time the page is refreshed. I'm currently using the following code to add an image to the site header:

 

header#header {
    background-image: url();
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

 

I've searched the forum but haven't found any solutions. Using 7.1.

Thanks in advance. 

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

To get a random image you are going to need more than CSS alone. You'd need some Javascript which would require the business plan or above.

I'm not aware of any code that does this but it doesn't seem, at first blush, all that hard to create.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.