6
का उपयोग करके svg पथ भरें एनिमेट करें सीएसएस का उपयोग करके svg fill को बदलना संभव है। लेकिन मैं एक एनीमेशन बनाने का प्रबंधन नहीं किया था।सीएसएस
<svg version="1.1" id="tick" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 60 60" enable-background="new 0 0 60 60" xml:space="preserve">
<rect id="fill" x="21" y="26" width="60" height="60"/>
</svg>
और, एस.ए.एस.एस. का उपयोग कर:
@include keyframes(loading)
0%
fill: black
50%
fill: white
100%
fill: black
#fill
fill: white
@include animation(loading 3s infinite)
क्या मैं गलत कर रहा हूँ यहाँ मेरी svg वस्तु है?
धन्यवाद =) लेकिन मैं एक विशेष आकार #fill चेतन की जरूरत है। – vadirn
@evergreenv आह ठीक है। एसवीजी में एनिमेट टैग के बजाय सीएसएस में ऐसा करने का कोई कारण है? – gotohales
@evergreenv वैसे, काम करने वाले किसी चीज़ के साथ उत्तर अपडेट किया गया। मुझे बताएं! – gotohales