Задать вопрос
@YakovSpb

Как в svg вывести градиент в fill?

Делаю спрайт. Как мне вывести градиент в спрайт?
Вот сам файл иконки
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
<style type="text/css">
	.st0{clip-path:url(#SVGID_2_);fill:url(#SVGID_3_);}
</style>
<g>
	<defs>
		<path id="SVGID_1_" d="M9.3,30.2c-3-1.8-3.5-2.6-3.5-6.1V17c0-0.5,0.1-0.7,0.3-1.1c0.3-0.6,1-0.9,1.6-0.9c0.3,0,0.6,0.1,0.9,0.2
			l5.7,3.3c1.7,1,2.9,3.1,3.1,5.4l0,10.1c0,0.3-0.2,0.5-0.5,0.5c-0.1,0-0.2,0-0.2-0.1l0,0L9.3,30.2z M34.1,15.2
			c0,0.1,0.1,0.2,0.1,0.2l0,0l0,8.7c-0.1,3.7-0.6,4.4-4.1,6.4l-5.8,3.4c-0.4,0.2-0.7,0.3-1.1,0.3c-0.7,0-1.3-0.4-1.6-0.9
			c-0.2-0.3-0.3-0.6-0.3-0.9v-6.7c0-2,1.3-4.2,3.2-5.5l8.9-5.1v0C33.7,14.9,34,14.9,34.1,15.2 M17.8,16.1l-9-5.1
			c-0.2-0.1-0.3-0.4-0.2-0.7c0-0.1,0.1-0.1,0.2-0.2v0l7.6-4.4C19.7,4,20.6,4,24.1,6l5.8,3.3c0.4,0.2,0.6,0.4,0.8,0.8
			c0.3,0.6,0.3,1.3,0,1.9c-0.2,0.3-0.4,0.5-0.7,0.7l-5.8,3.4c-0.9,0.5-1.9,0.8-3.1,0.8C20,16.9,18.9,16.6,17.8,16.1 M20,0
			c-1.3,0-2.6,0.3-3.7,1L5.6,7.3C3.4,8.6,2,11,2,13.6v12.8c0,2.6,1.4,5,3.6,6.3L16.3,39c1.1,0.7,2.4,1,3.7,1H20c1.3,0,2.6-0.3,3.7-1
			l10.7-6.3c2.2-1.3,3.6-3.7,3.6-6.3V13.6c0-2.6-1.4-5-3.6-6.3L23.7,1C22.6,0.3,21.3,0,20,0z"/>
	</defs>
	<clipPath id="SVGID_2_">
		<use xlink:href="#SVGID_1_"  style="overflow:visible;"/>
	</clipPath>
	
		<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-87.0856" y1="140" x2="-86.9189" y2="140" gradientTransform="matrix(219.5379 -11.5055 10.3552 243.9254 17670.5703 -35130.5586)">
		<stop  offset="0" style="stop-color:#6F00F9"/>
		<stop  offset="1" style="stop-color:#69BAC0"/>
	</linearGradient>
	<polygon class="st0" points="2.1,41.9 39.7,39.9 37.9,-1.9 0.3,0.1 	"/>
</g>
</svg>


Вот спрайт:
<svg display="none" xmlns="http://www.w3.org/2000/svg">

<symbol id="yad"  viewBox="0 0 40 40">

</symbol>

</svg>
  • Вопрос задан
  • 75 просмотров
Подписаться 1 Простой Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы