-
random images using css
I'd like the viewer to see a separate image each time the page is visited. I'm using a div id and am setting the image using the background property. I have several styles already setup called photo1, photo2, photo3, etc. that have a different background image declared in each.
HOW do I get the name generated (photo1, photo2, photo3, etc) and passed into the HTML code along the lines of <div id="photo1">?
Thanks for your time.
-
-
You can't do that with CSS, you will have to use JavaScript or PHP or some other script language.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks