簡體   English   中英

如何在css3中制作此橢圓形

[英]How to make this oval shape in css3

在此處輸入圖片說明

width: 100%;
    height: 200px;
    background: #5e2424;
    -moz-border-radius: 100px / 50px;
    -webkit-border-radius: 100px / 178px;
    border-radius: 694px 208px 0px 0px;
    z-index: 100;
    position: relative;
    top: -199px;
}

如何使該橢圓像圖像中一樣?

使用偽元素

 div { position: relative; width: 556px; height: 363px; background: url(https://i.stack.imgur.com/gHNBX.png); background: cover; overflow: hidden; } div::after { content: ''; position: absolute; top: 165px; left: -45%; width: 180%; height: 200%; background: rgba(255,0,0,0.7); border-radius: 50%; } 
 <div></div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM