圆边,不圆角

use*_*567 22 css rounded-corners css3 css-shapes

我想在CSS中创建一个如下所示的形状.正如你所知道的那样,只需简单地应用圆角就需要更多的调整......

底部圆形的形状

可以吗?

小智 22

这是jsfiddle:http://jsfiddle.net/swqZL/

具有类"figure"的元素div的CSS:

.figure {
height: 400px;
width: 200px;
background-color: black;
border-bottom-left-radius: 100%30px;
border-bottom-right-radius: 100%30px;    
}
Run Code Online (Sandbox Code Playgroud)

水平半径100%,垂直半径30px


小智 5

<div style="background: black; 
        width: 300px; 
        height: 450px; 
        padding-top: 50px;">
    <div style="width: 200px; 
            height: 400px; 
            background: white; 
            margin: 0 auto;
            border-radius: 0 0 100px 100px / 0 0 25px 25px;
            -moz-border-radius: 0 0 100px 100px / 0 0 25px 25px;
            -webkit-border-radius: 0 0 100px 100px / 0 0 25px 25px;
            ">
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

有关选择性椭圆边界半径的信息,请访问:http://www.sitepoint.com/setting-css3-border-radius-with-slash-syntax/

  • 1.没有前缀的人口应该是最后一个,再加上这些天,不再需要带前缀的人口。2.为什么使用内联样式?3.为什么要有两个要素?一个人会做到的。演示http://dabblet.com/gist/4626553 (2认同)