What should I do if jsp css images are not displayed?

藏色散人
Release: 2022-12-30 11:11:14
Original
3135 people have browsed it

The solution to the jsp css image not displaying: first import the image into the created img file directory; then modify the code in CSS to "background-image: url(img/flight.jpg);" That’s it.

What should I do if jsp css images are not displayed?

The operating environment of this tutorial: windows7 system, Java8.0&&css3 version, Dell G3 computer.

Recommended: "css video tutorial"

Solution

1. First, import the image into the pre-built img file directory, as shown in the figure:

What should I do if jsp css images are not displayed?

2. Since the img folder and the jsp file are in the same directory, the code part in CSS should be written like this:

What should I do if jsp css images are not displayed?

Main part: background-image: url(img/flight.jpg);

The other three lines are irrelevant content and should be ignored.

For more programming-related knowledge, please visit: Programming Teaching! !

The above is the detailed content of What should I do if jsp css images are not displayed?. For more information, please follow other related articles on the PHP Chinese website!

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