Stepping through my page, this line of code turns off my SVG Filter:
if (document.getElementById("cPreview") != null) document.getElementById("cPreview").style.filter = "brightness(" + parseInt(percentB) + "%)" + " contrast(" + parseInt(percentC) + "%)" + " saturate(" + parseInt(percentS) + "%)";
If I add SVG code to that, my CSS Filters are turned off:
if (document.getElementById("cPreview") != null) document.getElementById("cPreview").style.filter = svgCOLOR + "brightness(" + parseInt(percentB) + "%)" + " contrast(" + parseInt(percentC) + "%)" + " saturate(" + parseInt(percentS) + "%)";
How do I code that so the SVG Filter and the CSS Filters play nicely together?
Thank you
Someone asked for an example. Here is the original image:
Here is the image with the CSS Filters applied:
Here is the image with the SVG Filter applied:
The image with all filters applied. I had to make this in a photo editor because that one line of code isn't working. It all comes down to that one line of code posted above. I can make CSS work, or make SVG work, but I cannot make both work together. Thank you
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…