How to give a div oval shape?

前端 未结 5 898
粉色の甜心
粉色の甜心 2020-12-03 18:17

I tried a lot on oval shape which have cut in both sides but not able to do it please \"enter<

5条回答
  •  攒了一身酷
    2020-12-03 18:34

    Try this:

    #oval-shape {
        width: 200px;
        height: 100px;
        background: blue;
        -moz-border-radius: 100px / 50px;
        -webkit-border-radius: 100px / 50px;
        border-radius: 100px / 50px;
    }
    

    Notice the ratios in the corner values in relation to the height.

    Demo - http://jsfiddle.net/XDLVx/

提交回复
热议问题