background image is not displayed online but it is in local
Can anybody guide me here?
CSS
background: url(/img/background_sw_web.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
path
http://piscolabis.info/img/
The image:
http://piscolabis.info/licht/img/background_sw_web.jpg
I can't use an absolute path because this domain is for testing
To test: http://piscolabis.info/licht/
The must funny is that in FF with the 开发者_JAVA技巧editCSS plugin when i click on 'edit css' and the sidebar loads the CSS, the image is Shown,
Shouldn't the path be like /licht/img/background_sw_web.jpg
instead?
Or if the file referencing to that image is in the same folder (e.g. the licht folder), just remove the forward slash at the beginning of the path. So it'll be like img/background_sw_web.jpg
Correct your path: like this:
background: url(../img/background_sw_web.jpg) no-repeat center center fixed;
Add: ..
with /img
like this ../img
精彩评论