因为朋友的关系,最近上facebook比较频繁。
发现上面的圆角图片并不是程序生成的(太费资源),仅仅用“定位”就解决了所有图片的圆角边效果。

该代码运用了 CSS Sprites 图片整合技术 将所有的圆角边框汇聚到一张PNG图片上(PNG兼容),然后外框加“相对定位 position:relative;”和“超出部分隐藏 overflow:hidden;”,在框内,应用绝对定位调整圆角的位置。附言:即日起,将不考虑IE6浏览效果

演示效果:
https://cuikai-wordpress.stor.sinaapp.com/uploads/roundedimage-corners.html

CSS代码:

#roundedimage{
overflow:hidden; width:50px; height:50px;
position:relative;
}
.UIRoundedImage_Corners {
background:transparent none repeat scroll 0 0;
display:block;height:100%;width:100%;
overflow:hidden;
position:absolute;top:0;left:0;
}

html代码:

Kai Cui