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
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:26:421507browse

css image url

The JSP page introduces the style app.css through cc362579e26385163dd43f29874a44d1
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;}

Image path problem

Statement:
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