younggunmotion Posted December 17, 2021 Share Posted December 17, 2021 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
creedon Posted December 17, 2021 Share Posted December 17, 2021 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment