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

204
Vistas
Blurred box with transparent center with css in react js

I have a design like this:

enter image description here

and I have a code like this:

<div data-testid="container" class="reactEasyCrop_Container img-crop-container">
     <img alt="" class="reactEasyCrop_Image reactEasyCrop_Contain img-crop-media" src="" 
     />
     <div data-testid="cropper" class="reactEasyCrop_CropArea 
     reactEasyCrop_CropAreaRound" style="width: 371.594px; height: 371.594px;">
     </div>
</div>

Now, how can I have this blur box that is transparent in the center with this code and CSS? Note that I can only use CSS and can't change the HTML code

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Without changing the html structure you can use radial-gradientto do so

.reactEasyCrop_CropAreaRound {
  display: none;
}

.img-crop-container {
  position: relative;
  width: 200px;
}

.img-crop-container::after {
  content: "";
  width: 100%;
  height: 100%;
  background: #FFFFFF70;
  position: absolute;
  background: radial-gradient(circle at center, transparent 50%, #ffffffa0 50%);
filter: drop-shadow(0px 0px 6px #ffffffa0);
  top: 0;
  left: 0;
}
<div data-testid="container" class="reactEasyCrop_Container img-crop-container">
  <img alt="" class="reactEasyCrop_Image reactEasyCrop_Contain img-crop-media" src="https://picsum.photos/200" />
  <div data-testid="cropper" class="reactEasyCrop_CropArea 
     reactEasyCrop_CropAreaRound" style="width: 371.594px; height: 371.594px;">
  </div>
</div>

about 4 years ago · Juan Pablo Isaza 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