有人能指出我正确的方向吗?我不明白为什么我不能将 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 有关?
最佳答案
确保 ../images/box/black_bottom.png
是从您的样式表到图像文件的路径。其他一切看起来都是正确的,但人们并不总是意识到路径是相对于 css 文件而不是包含它的页面。
在那里尝试一个绝对 URL,看看它是否会出现。如果是这样,您就知道您的相对 URL 不正确。
关于css - 我无法在我的 div 背景中获取此图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2321823/