-3
Does anyone know how to do that "curve" effect on a div? link to img
I was trying to do more I couldn’t. The code I was using:
body{
height: 100vh;
width: 100vh;
background:#7ABCFF;
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: center;
}
.menuCont{
width: 100%;
height: 10%;
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: center;
}
.menu{
background: #fff;
width: 60%;
height: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
align-content: center;
border-radius: 20px 20px 0 0px;
}
.icons{
width: 20%;
height: 100%;
}
.menuCurva{
background: #fff;
}
.menuCurva:before{
content:'';
padding: 5px; /* um espaçamento de 5px é suficiente */
background: #fff; /* mesmo fundo da página */
width:2px;
height: 50%;
float:right;
position:relative;
border-radius: 100% 0 0 0; /* curvo a borda de baixo */ /* borda inferior em 5px na cor preta */
position: relative;
left: 1px;
}
.menuCurva:after {
content:'';
padding: 5px; /* um espaçamento de 5px é suficiente */
background: #fff; /* mesmo fundo da página */
width:2px;
height: 40%;
float:left;
border-radius: 0 100% 0 0; /* curvo a borda da direita */
right: 1px;
position: relative;
bottom: 19px;
}
.teste{
width: 100%;
height: 40%;
background: #7ABCFF;
border-bottom-left-radius: 100%;
border-bottom-right-radius: 100%;
}
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<div class="menuCont">
<div class="menu">
<div class="icons">
</div>
<div class="icons">
</div>
<div class="icons menuCurva">
<div class="teste">
</div>
</div>
<div class="icons">
</div>
<div class="icons">
</div>
</div>
</div>
</body>
</html>
Do not post the question again if it has already been closed, read the reason for closing and improve the old question
– Denis Rudnei de Souza
This may help you https://answall.com/questions/299864/c%C3%adrculo-with-curved-edge
– hugocsl
thanks a lot, I’ll take a look, I think it will help me a lot
– william