我的问题是图片无法加载到页面上。它在文件夹中,它是一个 .png,看起来一切都是正确的......关于如何让它加载 img 的任何想法?
header.masthead {
text-align: center;
color: white;
background-image: url(..//HGlogo.png);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
最佳答案
您必须将单个/用于创建文件位置,例如
background-image: url('../img/HGlogo.png');
假设您在同一文件夹或同一位置有图像,请不要这样使用 (../)
关于jquery - 为什么这不打开图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47919197/