百度空间 | 百度首页 
 
查看文章
 
为图片加上双实线的边,或者阴影
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.

double border for images

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.
That's it! :)

补充一下,其实这个很容易变通成为图片加上阴影,只需要在用一个阴影图片就行了,右和下加padding


类别:css&js | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu