Ich möchte ein SVG-Rad zeichnen, was sich dreht und einen linearen Gradienten hat. Darüber hinaus sollte das Rad während des Drehens eine Steigung an der gleichen Stelle (oben) haben. Ich zeichnete es:Gradient auf das ganze anwenden SVG
<svg width="950" class="wheel" height="950" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="wheel" x1="0%" y1="0%" x2="0%" y2="50%" gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#fff"/>
<stop offset="100%" stop-color="#bec7cf"/>
</linearGradient>
</defs>
<circle cx="475" cy="475" r="430" stroke="url(#wheel)" fill="url(#lines)" stroke-width="10"></circle>
<circle cx="475" cy="475" r="395" stroke="url(#wheel)" fill="transparent" stroke-width="10"></circle>
<line x1="457" y1="80" x2="457" y2="870.00" stroke="url(#wheel)" stroke-width="10"></line>
<line x1="492" y1="80" x2="492" y2="870.00" stroke="url('#wheel')" stroke-width="10"></line>
<line x1="457" y1="80" x2="457" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(30 475 475)"></line>
<line x1="492" y1="80" x2="492" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(30 475 475)"></line>
<line x1="457" y1="80" x2="457" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(60 475 475)"></line>
<line x1="492" y1="80" x2="492" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(60 475 475)"></line>
<line x1="457" y1="80" x2="457" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(90 475 475)"></line>
<line x1="492" y1="80" x2="492" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(90 475 475)"></line>
<line x1="457" y1="80" x2="457" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(120 475 475)"></line>
<line x1="492" y1="80" x2="492" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(120 475 475)"></line>
<line x1="457" y1="80" x2="457" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(150 475 475)"></line>
<line x1="492" y1="80" x2="492" y2="870.00" stroke="url('#wheel')" stroke-width="10" transform="rotate(150 475 475)"></line>
</svg>
Aber der Gradient dreht sich mit Zahlen.
Gibt es eine Möglichkeit kann ich Gruppenelemente und einen Gradienten auf die ganze Gruppe als eine Figur gelten?
Wie drehst du das Rad? –
@RobertLongson rotierende Gruppen beim Drehen Gradient rückwärts – Viktor
Ich meine, wo ist der Code, der das tut? –