Skip to content

Instantly share code, notes, and snippets.

@ibeeger
Created May 25, 2018 11:39
Show Gist options
  • Save ibeeger/434d9fab1009f7ad8bd831300b83d592 to your computer and use it in GitHub Desktop.
Save ibeeger/434d9fab1009f7ad8bd831300b83d592 to your computer and use it in GitHub Desktop.

公共属性

  • x
  • y
  • width
  • height

svg

rect

  • stroke 边框颜色
  • stroke-width 边框宽度
  • fill 填充颜色 支持透明
  • rx 圆角的x方位的半径
  • ry 圆角的y方位的半径

circle

  • cx 圆心x
  • cy 圆心y
  • r 半径

ellipse

  • cx 圆心
  • cy 圆心
  • rx x方向半径
  • ry y方向半径

line

  • x1
  • y1
  • x2
  • y2

polyline

  • points 折线的坐标点

polygon

  • points 多边形坐标

path

  • d M 移动 x y
  • d H 水平线 V 垂直线 L line to
  • stroke-dasharray = "5,10,10"

linearGradient 渐变 横向

  • <stop id="stop1" offset="0%"/>

radialGradient

  • <stop offset="0%" stop-color="red"/>

animateTransform

demo地址

  • attributeName="transform"
  • begin="0s"
  • dur="20s"
  • type="rotate"
  • from="0 60 60" 角度、x、y
  • to="360 100 60"
  • repeatCount="indefinite"

animateMotion 沿着路径动画

  • path="M 0 0 H 300 Z"
  • dur="3s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment