【发布时间】:2021-06-30 13:42:50
【问题描述】:
我正在尝试在屏幕上画一个半圆,我可以在上面放置按钮和其他东西,就像 AdminBro 顶部蓝色圆圈一样,但要小一点。我是这样做的:
.navbar {
position: relative;
overflow: hidden;
}
.eclipse {
position: absolute;
width: 200vw;
height: 200vw;
left: -50vw;
top: -180vw;
background-color: #41B3A3;
border-radius: 100vw;
}
<div id="root">
<div class="navbar">
<div class="eclipse"></div>
</div>
</div>
如您所见,这是一个反应应用程序。问题是我没有得到想要的结果,请告诉我为什么?
【问题讨论】:
-
检查元素:
body.landing .main-hero { background: #4268F6; color: #fff; padding: 300px 40% 160px; border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; margin: -250px -30% 0; text-align: center; } -
是的先生,这似乎对管理员兄弟的检查元素很熟悉,问题是,你能解释一下它是如何以及为什么它有效而我的无效吗?