filter: mask(***);
Browser |
|
---|---|
Type |
|
The mask filter add the mask effect to the element.
Changes the transparent area to the specified color, and changes the non-transparent area to transparent.
#example {
filter: mask(color=#0000ff);
}
Attribute | Value | Explanation |
---|---|---|
color | color code or name | the color of the transparent area |
Example
<img src="image/friend2.gif" alt="IMG" width="170" height="140">
- Output
-
<div style="font: bold 170% sans-serif; width: 100%;">
Example text
</div>
- Output
-
Example text
<img src="image/friend2.gif" alt="IMG" width="170" height="140" style="filter: mask(color=#ffd37d);">
- Output
-
<div style="font: bold 170% sans-serif; width: 100%; filter: mask(color=green);">
Example text
</div>
- Output
-
Example text