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

186
Vistas
How to scale a rotated child element to fit its parent?

I have this element with the following dimensions width: 90px height: 108px

Image 1

After rotating it's size "gets bigger"

Image 2

How can I scale it so it fits its container with any rotating angle?

Image 3

Code:

figure {
  grid-area: image;
  position: relative;
  transform: rotate(-12deg);
  width: min(50vw, 90px);
  height: min(60vw, 108px);
  img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 1.2rem;
    border: 6px solid var(--white);
  }
}

Ps: I'm using JSS, so any JavaScript solutions are also welcome.

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