Home > Web Front-end > HTML Tutorial > css images are not displayed_html/css_WEB-ITnose

css images are not displayed_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:26:42
Original
1507 people have browsed it

css image url

The JSP page introduces the style app.css through <%@ include file="/include/meta.jsp"%>
app.css defines the style in the following way

.login .login_logo {height:55px;background:url(/images/login/logo.jpg) no-repeat 10px 0px;}
But the image cannot be displayed.
If changed to .login .login_logo {height:55px;background:#FFF000 no-repeat 10px 0px;}, the color effect can be displayed
Through the browser http://localhost:8777/diao/images/ login/logo.jpg can also display images, so why the images cannot be displayed

Reply to the discussion (solution)

The image path setting is wrong

Image path setting error
You can already access the image through this path http://localhost:8777/diao/images/login/logo.jpg
Then how should you set the path

url(/diao/images/login/logo.jpg) How about this.

There is a problem with the path. If you reference the file, the path must be calculated according to the referenced file. background:url(../images/login/logo.jpg) Try

image path problem.

You try this, just change the path like I did

.login .login_logo {height:55px;background:url(~/images/login/logo.jpg) no-repeat 10px 0px;}
Copy after login

Image path problem

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template