[英]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.