Andereoo / TkinterWeb

Python bindings for Tkhtml.
MIT License
146 stars 16 forks source link

HTML transparent background color over other placed object? #104

Open pzelchenko opened 3 weeks ago

pzelchenko commented 3 weeks ago

Hi, Andrew. Love this tool. I have a special application where I want to superimpose HTML-based text blocks over background widgets (I'm actually placing HTML over SVG polygons). I'd like to have the HTML text overlay with a transparent background, i.e., a multiply, to let the background object show through as the background for the HTML.

I've tried changing for example, HtmlLabel(...background="none" and bg="#00000000"), but HtmlLabel() doesn't seem to recognize either of those switches. Styling the CSS with { background-color: transparent; opacity: 0.0 } also doesn't work. I can change the background color, but apparently not its transparency, unless I'm missing something.

I'm wondering if there's a right way to do this and, if not, whether HtmlLabel() can be modified to inherit Label()'s background transparency feature.