http://jsfiddle.net/efDuN/我怎样才能让我的形象边界出现的背景色
我试图创建一个顶部图片边框页脚和背景颜色之外。但是,图像具有透明度,可以显示边缘以外的背景颜色。页脚的高度在Ems中,而边界图像的高度是46像素。
如何在保持其灵活性(Ems)的同时让边框出现在背景颜色之外?
<div id="footer">
<br>
<p>Copyright (c) 2008</p>
<br>
body {
background-color: black;
}
#footer {
border-style: solid; border-width: 46px 0px 0px;
-moz-border-image: url("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 0 repeat;
-webkit-border-image: url("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 0 repeat;
-o-border-image: url("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 0 repeat;
border-image: url("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 0 fill repeat;
background-color: pink;
background-repeat: repeat;
text-align: center;
color: #ffffff;
height: 6em;
width: 100%;
}
其他答案很好,但这似乎是最简单的。我不同意这是重复的 – Niahc
如果你知道一个问题是另一个问题的重复,**请投票结束它作为** –
谢谢Zach。看起来你已经做到了这一点,但我不能删除我的答案。 –