Can you define defs when using a series of symbols in an SVG element? -
i trying define defs 1 of svgs using. set have load of reusable icons symbols in svg tags:
<svg> <symbol id="id" viewbox="..."> <path fill="#..." d="..."/> <path fill="#..." d="..."/> </symbol> <symbol id="id" viewbox="..."> <path fill="#..." d="..."/> <path fill="#..." d="..."/> </symbol> <symbol id="id" viewbox="..."> <path fill="#..." d="..."/> <path fill="#..." d="..."/> </symbol> </svg>
to display 1 of icons:
<svg> <use xlinkhref='#id'></use> </svg>
i have icon has gradient, specified in defs tags, i'm not sure how works method of using svgs. way specify defs tags in use block of code:
<svg> <defs> <lineargradient ...> <stop stopcolor=“#... " offset=“0%“></stop> <stop stopcolor=“#...” offset=“100%“></stop> </lineargradient> </defs> <use xlinkhref='#id'></use> </svg>
or can put in same location symbols defined re-use, don't have re-specify every time use icon?
thank you
Comments
Post a Comment