Css带边框和一些填充的圆形图像

时间:2012-04-19 07:52:21

标签: html css

enter image description here

希望这张照片说明一切...... !!!需要在html + css中执行此操作。注意:我想要图像中的边框。

1 个答案:

答案 0 :(得分:8)

CSS:

#border {
    border:3px dashed white;
    border-radius:100px;
    width:184px;
    height:184px;
    position:relative;
    left:5px;
    top:5px;
}

#image {
    background-image:url(table.jpg);
    width:200px;
    height:200px;
    border-radius:100px;
}​

HTML:

<div id="image">
    <div id="border"></div>
</div>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

根据需要调整宽度和高度。

演示:http://jsfiddle.net/yGcFx/