Random background images CSS3

后端 未结 6 485
北荒
北荒 2020-12-10 07:36

I am doing small website, however I have like 5-6 images for my background, and I want to make it random every time I refresh the page. This is what I got in style.css :

6条回答
  •  长情又很酷
    2020-12-10 08:08

    Really short option: (if you can use php in the page). Substitute the urls of your backgrounds for the filenames that are in single quotes.

    background: url('');
    

提交回复
热议问题