简体   繁体   中英

Background Image Wont Show

I'm trying to get this style to work for the body of the HTML page, it works when the style is applied within the tags but not when used with an external style sheet.

CSS Doesn't work with this code.

body {
    background-image:url(img/geometric.jpg);
}

HTML Works here.

<body style="background-image:url('img/geometric.jpg');">  
</body>

I want to use external styling for the whole page. I'm curious on how to fix this odd issue.

图像的路径必须相对于引用该图像的CSS文件,而不是将出现在其中的HTML文件。

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