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

230
Vistas
How can I increase the size of a circle with zoom and an animation effect using JavaScript?

I have implemented a button and a circle. As soon as you click on the button, the circle is enlarged by 10 times. Unfortunately, this does not happen so nicely. Is there a possibility to add an animation to the enlargement? Unfortunately, I haven't found anything on the internet yet.

function zoom() {
    let example = document.getElementById("a");
    example.style.zoom = 10.0;
  }
div.circle {
      width: 25px;
      height: 25px;
      border-radius: 100%;
      background-color: orange;
    }
<button onclick="zoom()">Zoom</button>
<div id="a" class="circle"></div>

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

0

The zoom property is non-standard. Instead, you should use the transform property and scale the circle.

function zoom() {
  let example = document.getElementById("a");
  example.style.transform = "scale(10,10)";
}
div.circle {
  width: 25px;
  height: 25px;
  border-radius: 100%;
  background-color: orange;
  transition: transform 0.5s;
  transform-origin: top left;
}
<button onclick="zoom()">Zoom</button>
<div id="a" class="circle"></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