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

199
Visualizações
Transparent background for HTML5 drag-and-drop ghost image firefox

In FF91.4.1esr, Linux Debian Bullseye, if I create a ghost image from a partially transparent png, a gray background is shown, instead of the webpage under the ghost image.

E.g. in this fiddle, created by someone else, I can see a gray box under the red and blue:

http://jsfiddle.net/c8p24q6y/

Is there anything I can do about it?

I tried setting ghostImg.style.background = 'white';, which gave me a white background.

I have also put the ghost image on the webpage independently of the dragged ghost image, and with the white background set, the background was white there, as well.

With background = transparent or none, on the webpage, the image was really transparent.

Which led me to believe that there is a layer BELOW the ghost image, to which I have no access:

layer1 <img>.src
layer2 <img>.background (transparent)
layer3 <div>.background (transparent)
layer4 browser-defined gray bedrock -> HOW TO REMOVE THIS?
layer5 the rendered webpage

Before tagging duplicate, I am aware of this question, it does not answer mine, and it is about Chrome:

Transparent background for HTML5 drag-and-drop ghost image

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