css - 我无法在我的 div 背景中获取此图片

标签 css background

有人能指出我正确的方向吗?我不明白为什么我不能将 black_bottom.png 作为圆 Angular 背景。

@charset "utf-8";

/* CSS Document */

html,
body {
  color: #444141;
  font-family: 'trebuchet ms' !important;
  font-size: 12px;
  margin: 0px;
  padding: 0px;
  height: 100%;
  background: #eaeade;
}

.justyParagraph {
  text-align: justify;
}

a img {
  border: 0;
}

.clearer {
  clear: both;
}

.rounded_corners {
  background: url(../images/box/black_bottom.png) no-repeat left bottom;
  color: #FFF;
  padding: 8px;
  width: 380px;
  border: 2px solid #4e4b4b;
  height: 450px;
}

div#blockdark {
  height: 517px;
  left: 450px;
  position: absolute;
  top: 130px;
  z-index: 1000000;
  width: 360px;
  visibility: visible;
}
<div id="blockdark">
  <div class="rounded_corners">
    Content
  </div>
</div>

这是一个示例,可能与 rounded_corners 类的 JavaScript 有关?

http://www.coldcharlie.nl/test

最佳答案

确保 ../images/box/black_bottom.png 是从您的样式表到图像文件的路径。其他一切看起来都是正确的,但人们并不总是意识到路径是相对于 css 文件而不是包含它的页面。

在那里尝试一个绝对 URL,看看它是否会出现。如果是这样,您就知道您的相对 URL 不正确。

关于css - 我无法在我的 div 背景中获取此图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2321823/

相关文章:

css - mod_pagespeed 正在重写但不合并

html - 在 div html 中垂直顶部对齐子子项

javascript - iPhone Mobile Safari 在从横向旋转到纵向后强制出现顶部栏(避免 "minimal ui")

ios - Phonegap 在 IOS 后台使用地理定位

javascript - Fabric .js : Assigning background color to group

ios5 - AVPlayer:按下主页按钮时背景音频停止,但在锁定屏幕时播放

html - 如何让我的两个 div 与 bootstrap 对齐?

html - 表格最后一行边框可见

多个 HTML 背景颜色的 Javascript 变量

css - 更改源选项卡背景颜色