CSS Circle边框

时间:2010-12-01 19:31:13

标签: css border geometry

<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>1</title>
        <style type="text/css">
body{margin:100px;}
#x
{
    position:relative;
    width:300px;
    height:360px;
    background-color:#07284a;
    -moz-border-radius: 30px;
    -webkit-border-radius:30px;
    -khtml-border-radius:30px;
    border-radius:30px;
    border:1px solid #37629B;
}
#f
{
    background-color:#07284a;
    width:126px;
    height:126px;
    position:absolute;
    right:-63px;
    top:-63px;
    -moz-border-radius: 63px;
    -webkit-border-radius:63px;
    -khtml-border-radius:63px;
    border-radius:63px;
    border:1px solid red;
}
        </style>
    </head>
<body>
<div id="x">
    <div id="f"></div>
</div>

在块“x”内部显示圆圈的红色边框... 如何从圆圈中删除25%的边框?抱歉英文不好

ADDED

http://www.flickr.com/photos/26325973@N02/5223999393/

1 个答案:

答案 0 :(得分:7)

我相信你想要删除边框的左下角四分之一,以便它与大矩形混合。您可以通过移除底部边框并旋转45度使底部成为左下角来实现:

border-bottom-color: transparent;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);