html - 为什么我的标题图片不显示?

标签 html css sass

<分区>


这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助 future 的读者。

关闭 9 年前

我正在使用此 Sass 在某些静态页面上设置标题样式,但背景图像未显示。我很确定我的相对文件路径是正确的(样式表在样式表文件夹中,图像是图像文件夹,两者都在 Assets 文件夹中)。还有什么可能导致这个?

.blue_section_header
    width: 900px
    height: 80px
    font-size: 30px
    font-weight: 700
    padding: 25px 0 0 40px
    color: #fff
    background: #54a0ce url(../images/section_header.png)
    -webkit-border-radius: 4px
    -moz-border-radius: 4px
    border-radius: 4px

最佳答案

在 Chrome 中:

1) Open Developer Tools
2) Click the Resources tab at the top
3) Open the Frames folder
4) Look for the Images folder and open it

您在图像文件夹中看到您的图像了吗?如果您没有看到图像,则表示您的相对路径不正确。

关于html - 为什么我的标题图片不显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21321487/

上一篇:php - 相同的 CSS 在不同的域上提供不同的字体大小

下一篇:html - 如何在 Joomla 1.5.20 中为文章添加自定义 CSS?

相关文章:

sass - 覆盖主题 bootstrap 4 中的默认 $border-radius-lg 变量

javascript - 我需要为计算机科学制作石头剪刀布,但我需要添加蜥蜴和史波克

html - CSS下拉菜单后面的模糊过滤器

html - 如何在 P 和居中文本上对齐 HTML 定位和输入

html - 纯 CSS 标签 : absolute positioning

html - svg 为什么 dasharray 没有按预期工作

php - 我不需要 tcpdf 库

html - 无法删除网页切片图像中图像下方的空间

javascript - 如何在调整大小时更改字体大小以适合其父框?

image - 如何以响应模式在移动/桌面上交换图像