Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

358
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda