简体   繁体   中英

background-image path css

I am having trouble to put a background-image on my website.

在此处输入图片说明

This is a Google Maps. So then I put a background-color (behind it): red; just to show you all what is going on:

section.middle{
background-color: red;

}

红色背景

But when I put a background-image it doens't show correctly:

section.middle{
background-image: url(/public/css/img/gymbackgroundhome.jpg);

}

无背景图片

This is my workspace:

工作空间

Thank you!

url() value in css has to be between quotes:

section.middle{
    background-image: url("/public/css/img/gymbackgroundhome.jpg");
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM