Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to remove background color when dragging png image?

I am trying to make a chess game in react-js using react-dnd

I am trying to make draggable and droppable png images between different div(which represents the board squares)

I tried to set the opacity of the image background-color to 0 but it doesn't work

The problem is that images take the square background-color when i drag them Is it possible to remove it from the dragging image ? If not is there another drag and drop library that makes it possible ?

like image 478
Leoyin Avatar asked Oct 28 '25 07:10

Leoyin


1 Answers

you can add css style to your draggable element:

transform: translate(0, 0);
like image 124
Frédéric Mascaro Avatar answered Oct 30 '25 23:10

Frédéric Mascaro