Reputation: 1966
Is local file the only allowed as url attribute value in CSS background-image property?
Upvotes: 1
Views: 4149
Reputation: 1551
I believe you can put any image file as a background-image. You just have to specify the full path: http://soundslikedesign.co.uk/images/photography/QE2%20and%20Chopper.jpg
.item {backround-image: url(http://soundslikedesign.co.uk/images/photography/QE2%20and%20Chopper.jpg)}
Upvotes: 0
Reputation: 4651
It can be from anywhere, just make sure your path is correct.
background-image: url(images/file.jpg);
For example would be to an image in the 'images' folder. ../ will help you navigate back between folders but I try to stay away from it for larger sites. Absolute URLs should work too, but should also not be relied on in case the image is removed.
Upvotes: 2