美文网首页
SVG Chapter 1

SVG Chapter 1

作者: _chuuuing_ | 来源:发表于2017-03-31 22:30 被阅读0次

资料来源 imooc 慕课网

1.1 位图 & 矢量图

Paste_Image.png Paste_Image.png

1.2 基本图形

基本图形
rect
rect
circle
circle
ellipse
ellipse
line
line
polyline
polyline
polygon
polygon

The following commands are available for path data:
• M = move to
• L = line to
• H = horizontal line to
• V = vertical line to
• C = curve to
• S = smooth curve to
• Q = quadratic Bézier curve 二次贝塞尔曲线
• T = smooth quadratic Bézier curveto 光滑二次贝塞尔曲线
• A = elliptical Arc 椭圆弧
• Z = close path

填充 描边 和 变换
  • fill
  • stroke
  • stroke-width
  • transform

1.3 基本操作API

  • 创建图形:document.createElementNS(namespaceURI, qualifiedName[, options]);
    namespaceURI:string that specifies the namespace to associate with the element.
    qulifiedName:A string that specifies the type of element to be created > a nodeName
    optiond:A optional object ElementCreationOptions containing a single property named is, whose value is the tag name for a custom element previously defined using customElements.define().
    (创建之后记得用appendChild()添加)

  • 添加图形:document.appendChild(childElement)

  • 获取 / 设置:
    element.setAttribute(name, value)
    element.getAttribute(name)

1.4实例

相关文章

  • SVG Chapter 1

    资料来源 imooc 慕课网 1.1 位图 & 矢量图 1.2 基本图形 rect circle ellipse ...

  • SVG Chapter 3

    资料来源 imooc 慕课网 SVG中的颜色: RGB和HSL 两种颜色表示方法都被CSS3 支持 互相转换的原理...

  • SVG Chapter 2

    资料来源 imooc 慕课网 2.1 世界,视野,视窗 世界:是无穷大的,由svg代码定义 视野:观看 世界 的一...

  • Android图片之svg

    1.SVG是什么2.SVG优点3.SVG使用4.获取SVG5.封装使用6.SVG动画 1.SVG是什么? SVG(...

  • D3 v5 学习笔记-2 SVG

    D3也可以使用Canvas绘图,不过对于SVG的支持更多。所以先从SVG开始。 1.SVG SVG教程-MDN 1...

  • SVG简介及其用法

    一、SVG - 基础 1.什么是SVG 2.SVG的优势 3.SVG与canvas的区别 4.用途 5.svg再将...

  • android apk瘦身

    apk打包流程图 1,SVG图片替换PNG图片 使用svg图注意事项: 1 svg图适用于小图标,svg宽高 小于...

  • HTML_内联SVG

    1、什么是SVG? SVG 指可伸缩矢量图形 (Scalable Vector Graphics)SVG 用于定义...

  • review html5 01:svg

    (1)知识点 (1.1)什么是svg (1.2)svg的优势 (1.3)svg格式( ) (2)细化 (2.1)...

  • 2019-06-20

    SVG版块知识内容1 什么是SVG? SVG 指可伸缩矢量图形 (Scalable Vector Graphics...

网友评论

      本文标题:SVG Chapter 1

      本文链接:https://www.haomeiwen.com/subject/anjbottx.html