zoukankan      html  css  js  c++  java
  • HTML5-SVG-路径(包括曲线) 文字

     1 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="400" width="450">
     2   <path d="M100 0 L25 100 L175 100 Z" />
     3   <path id="lineAB" d="M 100 350 l 150 -300" stroke="red" stroke-width="2" fill="none" />
     4   <path id="lineBC" d="M 250 50 l 150 300" stroke="red" stroke-width="2" fill="none" />
     5   <path d="M 175 200 l 150 0" stroke="green" stroke-width="3" fill="none" />
     6   <path d="M 100 350 q 150 -300 300 0" stroke="blue" stroke-width="5" fill="none" />
     7   <path d="M 100 350 q 100 -500 200 0" stroke="blue" stroke-width="5" fill="none" />
     8   <!-- Mark relevant points -->
     9   <g stroke="black" stroke-width="3" fill="black">
    10     <circle id="pointA" cx="100" cy="350" r="3" />
    11     <circle id="pointB" cx="250" cy="50" r="3" />
    12     <circle id="pointC" cx="400" cy="350" r="3" />
    13   </g>
    14   <!-- Label the points -->
    15   <g font-size="30" font="sans-serif" fill="black" stroke="none" text-anchor="middle">
    16     <text x="100" y="350" dx="-30">A</text>
    17     <text x="250" y="50" dy="-10">B</text>
    18     <text x="400" y="350" dx="30">C</text>
    19   </g>
    20 </svg

      • M = moveto
      • L = lineto
      • H = horizontal lineto
      • V = vertical lineto
      • C = curveto
      • S = smooth curveto
      • Q = quadratic Bézier curve
      • T = smooth quadratic Bézier curveto
      • A = elliptical Arc
      • Z = closepath
  • 相关阅读:
    【FPGA】结构化层次化设计
    【FPGA】库、包和子程序 过程 函数
    【FPGA】8位奇偶校验 / 加(减)法器 VHDL程序
    【FPGA】顺序语句
    【FPGA】并行语句
    【FPGA】VHDL基础
    Luogu P3349 小星星
    Luogu P4284 概率充电器
    NOIP2018 | D2T2 & D2T3
    二项式反演 小记
  • 原文地址:https://www.cnblogs.com/hack0573/p/5590176.html
Copyright © 2011-2022 走看看