Sfondo Trasparente in GIF Animate
(Transparent BackGround in Animated GIFs)
gifsicle -U --disposal=previous --transparent="#ffffff" -O2 anim.gif > anim_trans.gif
where anim.gif and anim_trans.gif are the source and destination file names, and #ffffff is the hex code of the color you want to make transparent (here, pure white).
The important options here are -U / --unoptimize and --disposal=previous, which together convert the animation into "flipbook mode", where each frame is fully erased before drawing the next one.
This allows extra transparency to be added to the frames without letting the earlier frames show through the transparent parts.
The -O2 option is not strictly necessary, but it's likely to shrink the file size of the resulting animation by optimizing the frames to avoid needlessly re-drawing static parts of the animation.