svg path 动画效果
http://www.zhangxinxu.com/wordpress/2014/04/animateion-line-drawing-svg-path-%E5%8A%A8%E7%94%BB-%E8%B7%AF%E5%BE%84/
<!DOCTYPE html>
<html lang="en"> <head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
path {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: dash 5s linear infinite;
} @keyframes dash {
to {
stroke-dashoffset: 0;
}
} </style>
</head> <body> <svg width="100%" height="320" xmlns="http://www.w3.org/2000/svg">
<!--<path d="M150 0 L75 200 L225 200 Z" stroke="black" fill="transparent"/>-->
<path d="M30 30 L25 30 L20 80 L10 90 L20 100 L20 180 L30 180 " stroke="red" fill="none" stroke-width="3"/>
<!--<path d="M30 20 C 30 20, 10 30, 20 30" stroke="black" fill="transparent"/>-->
<!--<text x="0" y="100" style="fill:red;">
节点1
</text>
--> </svg> <svg width="320" height="320" xmlns="http://www.w3.org/2000/svg">
<title>马儿跑</title>
<g>
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<set attributeName="x" attributeType="XML" to="60" begin="3s" />
</text>
</g>
</svg>
<br/>
<svg width="320" height="320" xmlns="http://www.w3.org/2000/svg">
<g>
<text font-family="microsoft yahei" font-size="120" y="160" x="160">
马
<animate attributeName="x" from="0" to="160" begin="0s" dur="3s" repeatCount="indefinite" />
</text>
</g>
</svg>
<br/>
<svg width="320" height="320" xmlns="http://www.w3.org/2000/svg">
<g>
<text font-family="microsoft yahei" font-size="80" y="100" x="100">马</text>
<animateTransform attributeName="transform" begin="0s" dur="3s" type="scale" from="0.1" to="1" repeatCount="1" />
</g>
</svg>
<br/>
<svg width="360" height="200" xmlns="http://www.w3.org/2000/svg">
<text font-family="microsoft yahei" font-size="40" x="0" y="0" fill="#cd0000">马
<animateMotion path="M10,80 L100,120,Z" begin="0s" dur="2s" repeatCount="indefinite"/>
<animate attributeName="opacity" from="1" to="0" begin="0s" dur="2s" repeatCount="indefinite" />
<animate attributeName="x" values="160;40;160" dur="3s" repeatCount="indefinite" />
</text>
<path d="M10,80 L100,120,Z" stroke="#cd0000" stroke-width="2" fill="none" />
</svg>
<br/> <svg width="320" height="200" xmlns="http://www.w3.org/2000/svg">
<title>马儿跑</title>
<text font-family="microsoft yahei" font-size="40" y="60" x="100">马
<animateTransform attributeName="transform" type="scale" from="1" to="2" dur="10s" repeatCount="indefinite" additive="sum"/>
<animateTransform attributeName="transform" type="rotate" from="0 100 60" to="360 100 60" dur="10s" fill="freeze" repeatCount="indefinite" additive="sum"/>
</text>
</svg>
</body> </html>
svg path 动画效果的更多相关文章
- SVG路径动画解密
原文:SVG路径动画解密 原文链接:http://www.gbtags.com/gb/share/5581.htm SVG路径动画效果现在貌似越来越多网站都使用了,给我的感觉就像是一段时间的流行而已, ...
- 如何使用SVG及其动画技术为你的 Web 前端开发带来一些新鲜的体验
任何有开发经验的前端工程师都会考虑到不成体系的设备生态所带来的挑战.设备间不同的屏幕尺寸.分辨率和比例使得产品难以提供一致的体验,对于那些对产品有着像素级完美追求的人这种体验差异尤其显著! SVG(可 ...
- CAShapeLayer的path动画
CAShapeLayer的path动画 效果 源码 https://github.com/YouXianMing/Animations // // CAShapeLayerPathController ...
- 如何使用SVG生成超酷的页面预加载素描动画效果
在线演示 本地下载 1 SVG简介 可缩放矢量图形是基于可扩展标记语言(标准通用标记语言的子集),用于描述二维矢量图形的一种图形格式.它由万维网联盟制定,是一个开放标准. 2 SVG的特点 与其他图像 ...
- 使用 SVG 来实现波浪 (wave) 动画效果
如下图所示的波浪动画效果,实现方法有很多,比如CSS或者是js等方法都可以实现.不过,要是使用SVG来实现的,我觉得比其它两种方法都要简单.这篇文章就来讲讲使用SVG来实现类似这样的波浪动画效果是多么 ...
- 纯CSS实现帅气的SVG路径描边动画效果(转载)
本文转载自: 纯CSS实现帅气的SVG路径描边动画效果
- SVG的路径动画效果
使用SVG animateMotion实现的一个动画路径效果,相关代码如下. 在线调试唯一地址:http://www.gbtags.com/gb/debug/c88f4099-5056-4ad7-af ...
- Android实现炫酷SVG动画效果
svg是眼下十分流行的图像文件格式了,svg严格来说应该是一种开放标准的矢量图形语言,使用svg格式我们能够直接用代码来描画图像,能够用不论什么文字处理工具打开svg图像.通过改变部分代码来使图像具有 ...
- 【Web动画】SVG 线条动画入门
通常我们说的 Web 动画,包含了三大类. CSS3 动画 javascript 动画(canvas) html 动画(SVG) 个人认为 3 种动画各有优劣,实际应用中根据掌握情况作出取舍,本文讨论 ...
随机推荐
- shell脚本由基础变量及特殊变量($@、$*、$#等)到实战。
一.shell脚本建立: shell脚本通常是在编辑器(如vi/vim)中编写,也可以在命令行中直接执行: 1.脚本开头: 规范的脚本第一行需要指出有哪个程序(解释器)来执行脚本中的内容,在L ...
- centos7安装iptables
使用CentOS 7时发现使用iptables防火墙时提示错误Unit iptables.service failed to load,意思是防火墙运行启动失败了,那么要如何处理呢. 一直用Cen ...
- CSS选择器手册
CSS选择器手册 选择器 选择器名称 例子 例子描述 CSS E.class 类选择器 E.intro 选择 class="intro" 的所有E元素. ...
- activity间的传参
Intent有两个作用:激活组件和附带数据 激活另一个activity的方法显示意图: 1. Intent intent = new Intent(); intent.setClass ...
- {ubuntu}不能挂载windows
sudo apt-get install ntfs-3g sudo ntfsfix /dev/sda?
- uvm_env——UVM大环境(UVM Environment )
1 What is uvm_env? uvm_env is used to create and connect the uvm_components like driver, monitors , ...
- Objective-C Runtime Reference
This document describes the OS X Objective-C 2.0 runtime library support functions and data structur ...
- IOS画线条
- (void)drawRect:(CGRect)rect { // draw a rounded rect bezier path filled with blue CGContextRef aRe ...
- lambda表达式的简单入门
前言:本人在看<Java核心技术I>的时候对lamdba表达式还不是太上心,只是当做一个Java 8的特性了解一下而已,可是在<Java核心技术II>里面多次用到,所以重新入门 ...
- MATLAB——解数独
数独 数独是一种逻辑游戏,玩家需要根据9x9盘面的已知数字,推理出剩余所有空格的数字,并满足每一行.每一列和每个粗线宫(3x3)内均含1~9,不重复. MATLAB中有关函数 M = dlmread( ...