Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!