SVG animateTransform元素示例

<animateTransform>元素用于沿直线路径对对象进行动画处理。

<animateTransform>元素可用于旋转, 平移, 缩放或倾斜转换。

如果要旋转形状, 则必须将attributeName设置为transform。并输入为旋转。

例子

<!DOCTYPE html>
<html>
<title>SVG Animation</title>
<body>

<h1>SVG Image</h1>
<svg xmlns="http://www.srcmini.org/2000/svg"
 xmlns:xlink="http://www.srcmini.org/1999/xlink">

<rect x="10" y="10" height="100" width="100"
    style="stroke:black; fill: purple; stroke-width: 2 ">

<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite"
   begin="0s" dur="10s" from="0 60 60 " to="360 60 60" />
</rect>

</svg>
</body>
</html>

立即测试

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_46650.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?