I have a list item that I want to visually disappear into the horizon during a JavaScript event. I am not looking to animate it, more like applying a filter effect. Is there a way in HTML/CSS/JavaScript to dynamically add gradual transparency without changing the existing background color or gradient? I want the element to fade out from top to bottom. Everything I have found so far either changes the background image to a gradient color or adjusts the opacity of the entire element.
Apologies if this question seems silly, I might just be having a brain lapse.
* Update * I found a solution that is similar to what I want, but I am struggling to implement it without knowing the original background color or setting it to something else.
CSS3 opacity gradient?