Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

196
Visualizações
How does Google Drive create this file drag animation in their website

When dragging multiple files in Google Drive, it does the slick animation where it compresses the files into a stack and displays a counter for the files in the top right corner. The answer I am looking for isn't about the exact CSS required for the animation, but I am looking for an answer that can describe the overall process of how this is done, beginning with the dragstart DOM event. From what I know, when an element starts to get dragged, the browser takes a bitmap screenshot of the element and uses that as the drag cursor image. I also know that you can set the drag image on the dragstart event, however, how are they dynamically generating and setting the drag image with the file name in it?

google drive drag animation demo GIF (2x)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It's not a drag image because if you move you cursor fast enough, you'd see that its speed is trying to catch up to you: it's position: fixed elements with the top: and left: (or translate or any number of methods) being from its initial coordinates to your mouse coordinates (mousemove event), and speed being transition: top 0.2, left 0.2.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda