日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

SVG动画.animateTransform

發(fā)布時(shí)間:2025/4/9 编程问答 16 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SVG动画.animateTransform 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1、來(lái)自于:SVG之Animation - 前端學(xué)習(xí)筆記 - SegmentFault.html(https://segmentfault.com/a/1190000009371194)

2、AnimateTransform.html(UTF8)

  ZC:下面的屬性(type="scale" from="1" to="4 2"),實(shí)際等價(jià)于(type="scale" from="1 1" to="4 2") ∵scale是2個(gè)參數(shù),(from="1")是省略了一個(gè)參數(shù)。

  ZC:同樣(type="rotate" from="0" to="45") 也是省略了參數(shù),但是 在寫(xiě) 圖形的屬性的時(shí)候?rotate是以 SVG的(0,0)坐標(biāo)為中心的,這里 同樣是這樣的...(可以觀察第二個(gè)矩形的變化)

  2.1、測(cè)試代碼

<!DOCTYPE html><html> <head><meta charset="UTF-8"> </head><body><svg width="800" height="600" viewBox="-400 -300 800 600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><!--矩形中心 == SVG的(0,0)點(diǎn)--><rect x="-10" y="-10" width="20" height="20" style="fill: #ff9; stroke: black;"><animateTransform id="a1" attributeName="transform" attributeType="XML" type="scale" from="1" to="4 2" additive="sum" begin="0s" dur="4s" fill="freeze"></animateTransform><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="45" additive="sum" begin="a1.end" dur="4s" fill="freeze"></animateTransform></rect><!--矩形中心 != SVG的(0,0)點(diǎn)--><rect x="20" y="20" width="20" height="20" style="fill: #ff9; stroke: black;"><animateTransform id="a1" attributeName="transform" attributeType="XML" type="scale" from="1" to="4 2" additive="sum" begin="0s" dur="4s" fill="freeze"></animateTransform><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="45" additive="sum" begin="a1.end" dur="4s" fill="freeze"></animateTransform></rect></svg></body> </html>

?

3、

4、

5、

?

轉(zhuǎn)載于:https://www.cnblogs.com/H5UI/p/8405789.html

總結(jié)

以上是生活随笔為你收集整理的SVG动画.animateTransform的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。