查看文章 |
为图片加上双实线的边,或者阴影
2008年11月08日 星期六 10:54
What we'll do here is use css border property for outer image border and we'll fake the inner border using combination of background and padding properties.
First we add a border property to the image and set the values img{
border:2px solid #72a143;
}
If we set the padding to 1px and add a yellow background, img{
border:2px solid #72a143;
padding:1px;
background:#ffeda5;
}
the image will receive another "border" inside the real one.
补充一下,其实这个很容易变通成为图片加上阴影,只需要在用一个阴影图片就行了,右和下加padding |
最近读者:
