[英]What's the difference in accessibility between having SVG inline or as an image?
[英]What is the difference of SVG's additive=“sum” between duration
以下代碼的區別?
為什么結果不同?
我以為是一樣的。
<svg width="1000" height="1000"> <circle cx="10" cy="10" r="10"> <animate attributeType="XML" attributeName="cx" dur="10s" values="100; 200; 100" repeatCount="indefinite" /> <animate attributeType="XML" attributeName="cx" dur="10s" values="0; 300; 0" repeatCount="indefinite" additive="sum" /> </circle> </svg>
<svg width="1000" height="1000"> <circle cx="10" cy="10" r="10"> <animate attributeType="XML" attributeName="cx" dur="19s" values="100; 200; 100" repeatCount="indefinite" /> <animate attributeType="XML" attributeName="cx" dur="1s" values="0; 300; 0" repeatCount="indefinite" additive="sum" /> </circle> </svg>
它不是時間的累加,如果這就是您的想法,則不是屬性(cx)的值。
由於您同時運行2個動畫,因此cx將作為每個動畫上cx值的組合而建立。
在第二個示例中。 由於其中一個動畫只有1秒長,因此它會在較慢的動畫之上快速波動。
如果您暫時忘記了添加劑,只需將兩個第二個cx值都替換為cy,您就會明白為什么動畫也從根本上有所不同。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.