svg学习笔记(二)
SMIL animation演示代码集锦
<svg width="1400" height="1600" xmlns="http://www.w3.org/2000/svg">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<set attributeName="x" attributeType="XML" to="30" begin="2s"></set>
</text>
<g transform="translate(200,160)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate attributeName="x" from="160" to="60" begin="0s" dur="3s" repeatCount="indefinite" />
</text>
</g>
<g transform="translate(320,320)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animateTransform attributeName="transform" begin="0s" dur="10s" type="rotate" from="0 160 160" to="360 160 160" repeatCount="indefinite"/>
</text>
</g>
<g transform="translate(480,480)">
<text font-family="microsoft yahei" font-size="80" y="100" x="100">
马
<animateTransform attributeName="transform" begin="0s" dur="3s" type="scale" from="1" to="1.5" repeatCount="indefinite"/>
</text>
</g>
<g transform="translate(480,80)">
<text font-family="microsoft yahei" font-size="40" x="0" y="0" fill="#cd0000">
马
<animateMotion path="M10,80 q100,120 120,20 q140,-50 160,0" begin="0s" dur="3s" repeatCount="indefinite" rotate="auto"></animateMotion>
</text>
<path id="horsePath" d="M10,80 q100,120 120,20 q140,-50 160,0" stroke="#cd0000" stroke-width="2" fill="none"/>
</g>
<g transform="translate(640,180)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate attributeName="x" from="160" to="60" begin="0s" dur="3s" repeatCount="indefinite" />
<animate attributeName="opacity" from="1" to="0" begin="0s" dur="3s" repeatCount="indefinite" />
</text>
</g>
<g transform="translate(640,360)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate attributeName="x" values="160;40;160" dur="3s" repeatCount="indefinite" />
</text>
</g>
<g transform="translate(640,520)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate attributeName="x" values="160;40;160" dur="3s" begin="2s;6s" />
</text>
</g>
<g transform="translate(640,680)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate id="x" attributeName="x" to="60" begin="0s" dur="1.5s" fill="freeze" />
<animate attributeName="y" to="100" begin="x.end-0.5" dur="1.5s" fill="freeze" />
</text>
</g>
<g transform="translate(760,20)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160" id="clickText">
马
<animate attributeName="x" to="60" begin="clickText.click" dur="3s" />
</text>
</g>
<g transform="translate(760,180)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate id="x0" attributeName="x" to="60" begin="0s" dur="2s" repeatCount="indefinite" />
<animate attributeName="y" to="100" begin="x0.repeat(2)" dur="2s" fill="freeze" />
</text>
</g>
<!--快捷键仅在FF下支持-->
<g transform="translate(760,340)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate attributeName="x" to="60" begin="accessKey(s)" dur="3s" repeatCount="indefinite" />
</text>
</g>
<g transform="translate(760,500)">
<text font-family="microsoft yahei" font-size="120" y="160" x="160" id="indefiniteText">
马
<animate attributeName="x" to="60" begin="indefinite" dur="3s" id="indefiniteA"/>
</text>
<a xlink:href="#indefiniteA">
<text x="300" y="200" fill="#cd0000" font-size="30">不要点我</text>
</a>
</g> <g transform="translate(10,500)">
<text font-size="60" y="60" x="160">
马
<animate attributeName="x" dur="5s" values="0; 20; 160" calcMode="linear" />
</text>
<text font-size="60" y="120" x="160">
马
<animate attributeName="x" dur="5s" values="0; 20; 160" calcMode="paced"/>
</text>
<text font-size="60" y="180" x="160">
马
<animate attributeName="x" dur="5s" values="0; 80; 160" keyTimes="0; .8; 1" calcMode="linear"/>
</text>
<text font-size="60" y="240" x="160">
马
<animate attributeName="x" dur="5s" values="0; 80; 160" keyTimes="0; .8; 1" calcMode="spline" keySplines=".5 0 .5 1; 0 0 1 1" />
</text>
</g> <g transform="translate(10,800)">
<text font-size="30" y="180" x="130">
马
<animateTransform attributeName="transform" type="scale" from="1" to="3" dur="5s" repeatCount="indefinite" additive="sum"/>
<animateTransform attributeName="transform" type="rotate" from="0 30 20" to="60 30 20" dur="5s" repeatCount="indefinite" additive="sum"/>
</text>
</g>
</svg>
svg学习笔记(二)的更多相关文章
- WPF的Binding学习笔记(二)
原文: http://www.cnblogs.com/pasoraku/archive/2012/10/25/2738428.htmlWPF的Binding学习笔记(二) 上次学了点点Binding的 ...
- AJax 学习笔记二(onreadystatechange的作用)
AJax 学习笔记二(onreadystatechange的作用) 当发送一个请求后,客户端无法确定什么时候会完成这个请求,所以需要用事件机制来捕获请求的状态XMLHttpRequest对象提供了on ...
- [Firefly引擎][学习笔记二][已完结]卡牌游戏开发模型的设计
源地址:http://bbs.9miao.com/thread-44603-1-1.html 在此补充一下Socket的验证机制:socket登陆验证.会采用session会话超时的机制做心跳接口验证 ...
- JMX学习笔记(二)-Notification
Notification通知,也可理解为消息,有通知,必然有发送通知的广播,JMX这里采用了一种订阅的方式,类似于观察者模式,注册一个观察者到广播里,当有通知时,广播通过调用观察者,逐一通知. 这里写 ...
- java之jvm学习笔记二(类装载器的体系结构)
java的class只在需要的时候才内转载入内存,并由java虚拟机的执行引擎来执行,而执行引擎从总的来说主要的执行方式分为四种, 第一种,一次性解释代码,也就是当字节码转载到内存后,每次需要都会重新 ...
- Java IO学习笔记二
Java IO学习笔记二 流的概念 在程序中所有的数据都是以流的方式进行传输或保存的,程序需要数据的时候要使用输入流读取数据,而当程序需要将一些数据保存起来的时候,就要使用输出流完成. 程序中的输入输 ...
- 《SQL必知必会》学习笔记二)
<SQL必知必会>学习笔记(二) 咱们接着上一篇的内容继续.这一篇主要回顾子查询,联合查询,复制表这三类内容. 上一部分基本上都是简单的Select查询,即从单个数据库表中检索数据的单条语 ...
- NumPy学习笔记 二
NumPy学习笔记 二 <NumPy学习笔记>系列将记录学习NumPy过程中的动手笔记,前期的参考书是<Python数据分析基础教程 NumPy学习指南>第二版.<数学分 ...
- Learning ROS for Robotics Programming Second Edition学习笔记(二) indigo tools
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 Learning ROS for Robotics Pr ...
- Redis学习笔记二 (BitMap算法分析与BitCount语法)
Redis学习笔记二 一.BitMap是什么 就是通过一个bit位来表示某个元素对应的值或者状态,其中的key就是对应元素本身.我们知道8个bit可以组成一个Byte,所以bitmap本身会极大的节省 ...
随机推荐
- java request判断微信客户端访问
微信客户端访问时候user-agent信息如下: Mozilla/5.0 (Linux; Android 5.0.1; M040 Build/LRX22C) AppleWebKit/537.36 (K ...
- java web 自定义错误页面 完整jsp错误页面代码(同时写错误日志) error.jsp
1.首先配置web.xml 添加一下代码 <error-page> <error-code>500</error-code> <location>/e ...
- SQL 获取 IDENTITY 三种方法 SCOPE_IDENTITY、IDENT_CURRENT 和 @@IDENTITY的区别
-------总结:用SCOPE_IDENTITY()函数靠谱 @@IDENTITY (Transact-SQL) 返回最后插入的标识值的系统函数. 备注 在一条 INSERT.SELECT INTO ...
- PagerSlidingTabStrip
https://github.com/jpardogo/PagerSlidingTabStrip
- Linux 设置系统时间和日期 API
嵌入式Linux 设置时间和日期 API ,它是busybox要提取的源代码. Linux设置时间和日期的步骤: 1. 设置系统时间和日期: 2. 该系统的时间和日期,同步到硬件. #include ...
- myeclipse 写java代码提示 dead code 原因
经常使用MyEclipse要么Eclipse编辑写java程序猿代码.您可能经常会遇到一个黄色警戒线:dead code:一般程序猿遇到这些问题都会置之不理,反正也不影响程序的编译运行.对,这不是bu ...
- 【点滴积累】通过特性(Attribute)为枚举添加更多的信息
转:http://www.cnblogs.com/IPrograming/archive/2013/05/26/Enum_DescriptionAttribute.html [点滴积累]通过特性(At ...
- QtSpeech会让Qt说话
想要多了解QtSpeech,那么随着本文的文字往下走吧!QtSpeech是一个Qt封装的跨平台TTS(文本变成语音输出)API,在不同平台下利用系统自带的TTS引擎.在Windows下使用SAPI, ...
- print之模块化
这里参考特权同学的模块化思想,将常用的print等任务模块化,便于直接调用,提高代码的效率和易读性.现转载之,以供日后的学习和工作参考. print模块参考代码如下: //============== ...
- 纯js写图片轮播插件
最近终于写成了自己创作的图片轮播插件,使用原生js编写.与目前网上流行的轮播插件相比,功能和效果稍弱,但是使用起来相当方便. 先看html代码 <!DOCTYPE html> <ht ...