I created a HTML page and when I open the page by simply clicking on it everything works fine. But when I open the page from Glassfish server from my Netbeans I cannot see the background image of the web page. Any ideas why this is happening?
The background image is displayed from the CSS using below code,
header {
position: relative;
width: 100%;
min-height: auto;
text-align: center;
color: #fff;
background-image: url(../img/header.jpg);
background-position: center;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}
Another question is if I open the webpage by just clicking on it I'm able to see the errors and warnings in the console but when I open the webpage from my Netbeans using Glassfish server I can't see any console errors.
Thanks in advance.
PS: The size of the image is 1.21 MB
This is the most weirdest reason that I'm seeing. I found that my image name is, header.JPG
and I was using header.jpg
(jpg in lowercase). I thought that HTML/CSS is case-insensitive. The most unusual thing is the browser used when I'm directly clicking on the web page and when I'm using Netbeans is same but yet I face the problem so that's weird.
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.