Making part of a div transparent

后端 未结 5 1090
小蘑菇
小蘑菇 2020-12-05 13:04

\"Example

I\'m trying to do something like this in HTML. It\'s a header, at the very top of the page. T

5条回答
  •  鱼传尺愫
    2020-12-05 14:00

    It may be possible with a CSS-alpha mask: https://caniuse.com/#feat=css-masks

    update 1

    • Create a DIV-layer ontop
    • Insert a CANVAS-element. Paint the black parts black, the rest should be transparent.

    update 2

    I am pretty sure, that there is no way to create this layout without using PNG-images with an alpha-layer in older browser.

提交回复
热议问题