Created
October 4, 2024 01:04
-
-
Save wpacademy/39d1268583daa1dae84ec571f236f6da to your computer and use it in GitHub Desktop.
CSS code for SVG Mask to Apply on a Section or Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selector { | |
aspect-ratio: 1200 / 600; | |
background-color: tomato; | |
mask-image: url("/* SVG URL */"); | |
-webkit-mask-image: url("/* SVG URL also here */"); | |
mask-repeat: no-repeat; | |
-webkit-mask-repeat: no-repeat; | |
mask-size: 100% auto; | |
-webkit-mask-size: 100% auto; | |
/* mask-size: contain; */ | |
/* -webkit-mask-size: contain; */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment