Answer
A gradient with 3 color stops… all the same green, and change the opacity of the end stops…
When saved to a PNG, the transparency will be in the PNG file… if that’s what you are after.
To use this on an image as in your example….
Place the image in Illustrator and draw a rectangle on top of it. Fill that rectangle with a 3-stop gradient, setting the middle stop to have an opacity of 0%…
For the gradient, you’ll want to use the “Registration” swatch so it include all colors. Otherwise, you may get some bleed though in the mask due to a color not being fully masked.
Note this is the opposite of the opacity settings shown in the green box above intentionally. Since you will be using this to hide elements, not just create transparency, you’ll need the opacity to be set up differently.
Select both the image and the gradient rectangle, and on the Transparency Panel click the Make Mask
button, then tick the Clip
option so it is not ticked. This creates an Opacity Mask in Illustrator.
For more information regarding Opacity Masks, see here: https://helpx.adobe.com/illustrator/how-to/illustrator-opacity-masks-transparency.html
Attribution
Source : Link , Question Author : Shenron , Answer Author : Community