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

166
Vistas
Change CSS transform perspective on click

Lets say this is my website:

* {
  font-size: 80px;
  text-transform: uppercase;
  font-family: sans-serif;
}

html {
background: yellow;

}

span {
  display: inline-block;
  transform: skew(-60deg, 0deg);
  transition: transform 0.5s linear;
  color: white;
  box-shadow: 0 0 30px red;
letter-spacing: 3em;
}
<div id="one">H<span>e</span>ll<span>o</span></div>

Is there a way to click the letters e or o and then this is shown with a top view while the whole page gets transformed in the same amount?

Love

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

0

This is not possible with only CSS, so with a few JavaScript we can do the following:

e.addEventListener('click', () => {
  document.body.setAttribute('data-skew', 'e');
});
o.addEventListener('click', () => {
  document.body.setAttribute('data-skew', 'o');
});
* {
  font-size: 80px;
  text-transform: uppercase;
  font-family: sans-serif;
}

html {
  background: yellow;
}

body[data-skew='e'] {
  transform: skew(60deg, 0deg);
}
body[data-skew='o'] {
  transform: skew(0deg, 0deg);
}

span {
  display: inline-block;
  transform: skew(-60deg, 0deg);
  transition: transform 0.5s linear;
  color: white;
  box-shadow: 0 0 30px red;
  letter-spacing: 3em;
}
<div id="one">H<span id="e">e</span>ll<span id="o">o</span></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