- Create a background layer in the desired color
- Select the paths that should form the mask and create a compound path
- Expand the transparency window
- Open the options menu and make sure ‘new opacity masks are inverted’ is selected
- In the same menu choose ‘make opacity mask’
Tag: illustrator
Exporting SVG from Ilustrator
Update:
Export artboard to SVG ‘for web’.
- Save as, use artboard
- Choose ‘try’ to export for web
- Choose options
- Careful when choosing ‘responsive’: it somehow adds vector parts that are outside the artboard area to the svg.
SVG profiles
SVG 1.0: all modern desktop and mobile browsers support SVG 1.1, so never choose this option.
SVG 1.1: You will almost always want this.
SVG Tiny/Basic: this is a subset of SVG intended for mobile devices. Only a handful of devices support SVG Tiny and not the full spec, so go for SVG 1.1.
Export a path from AI to png
To export a path from AI (CS5) do the following:
See also http://creativedroplets.com/transparent-png-with-illustrator/
- Select the path(s) you want to export
- Copy and paste it somewhere if necessary
- Draw an artboard somewhere with the artboard tool
- In the artboard presets select fit to selected art
- Now export as png and check the box ‘use artboards’
- Select your artboard
- Select the correct resolution (if the resolution is different from the AI source, the png size will change accordingly)