Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

349
Visualizações
How do I add negative radius to half circle?

I want to do this:

enter image description here

So far I got this:

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #red;
  z-index: 10000;
  height: 10px;
  overflow: visible;
}

.header:after {
  content: '';
  position: relative;
  top: 100%;
  display: block;
  margin: 0 auto;
  background: red;
  width: 50px;
  height: 25px;
  border-radius: 10px 10px 50px 50px;
}
<div class="header"></div>

Codepen.

I can't get the top radius to go outwards the half circle like in the image.

How to do this with CSS?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You cannot make a negative radius on a border.

There is the possibility to make an SVG path or radial gradient... I made a new div as circle and radial gradient on pseudo-elements. It's not perfect, but it will possibly show you the direction to solution :)

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: red;
  z-index: 10000;
  height: 10px;
  overflow: visible;
}

.header-circ {
  position: relative;
  top: 100%;
  display: block;
  margin: 0 auto;
  background: red;
  width: 500px;
  height: 250px;
  border-radius: 10px 10px 250px 250px;
}
.header-circ::before, .header-circ::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
   z-index: -1;

}
.header-circ::before {
    left:-94px;
    background: radial-gradient(circle at bottom left,  white 0%,white 75%,red 75%);
}
.header-circ::after {
    right:-94px;
    background: radial-gradient(circle at bottom right,  white 0%,white 75%,red 75%);

}
<div class="header"></div>
<div class="header-circ"></div>

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda