how to make an oval in css?

前端 未结 7 725
甜味超标
甜味超标 2020-12-03 00:56

I want to make an oval like:

\"enter

But when i used this code:



        
相关标签:
7条回答
  • 2020-12-03 01:53

    All the previous answers, He doesn't want a circle according to his question. He wants an Oval. This works but there is probably a better way.

    #oval{position:relative;background-color:green;width:20px;height:100px;  
      display:inline-block;z-index:100;
      }
    #one{background-color:green; display:inline-block;width:200px;height:100px;border-radius:50%;position:relative;left:100px;}
    #two{background-color:green; display:inline-block;width:200px;height:100px;border-radius:50%;position:relative;left:-100px;}
    <div id="one">&nbsp;</div><div id="oval">&nbsp;</div><div id="two">&nbsp;</div>

    0 讨论(0)
提交回复
热议问题