SVG标签类型

2025-07-02 00:10:46 20

黑客攻防从入门到精通

书名:黑客攻防从入门到精通

到手价格:209.00

ISBN:9787111469872

出版社:机械工业出版社

商品编码:19991659542

书店:北京华夏学林图书专营店

支持的SVG标签类型及插入示例:

  1. 基本形状标签:

<svg width="100" height="100">
  <rect x="10" y="10" width="80" height="80" fill="red"/>
</svg>
  1. 路径标签:

<svg width="100" height="100">
  <path d="M10 10 L90 10 L50 90 Z" fill="blue"/>
</svg>
  1. 文本标签:

<svg width="200" height="100">
  <text x="20" y="50" font-family="Arial" font-size="20">SVG文本</text>
</svg>
  1. 圆形标签:

<svg width="100" height="100">
  <circle cx="50" cy="50" r="40" fill="green"/>
</svg>
  1. 椭圆标签:

<svg width="100" height="100">
  <ellipse cx="50" cy="50" rx="40" ry="30" fill="yellow"/>
</svg>
  1. 线条标签:

<svg width="100" height="100">
  <line x1="10" y1="10" x2="90" y2="90" stroke="black" stroke-width="2"/>
</svg>
  1. 多边形标签:

<svg width="100" height="100">
  <polygon points="50,10 90,90 10,90" fill="purple"/>
</svg>
  1. 图像标签:

<svg width="100" height="100">
  <image xlink:href="image.png" width="100" height="100"/>
</svg>
  1. 渐变标签:

<svg width="100" height="100">
  <defs>
    <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
      <stop offset="0%" style="stop-color:rgb(255,0,0);stop-opacity:1"/>
      <stop offset="100%" style="stop-color:rgb(0,0,255);stop-opacity:1"/>
    </linearGradient>
  </defs>
  <rect x="10" y="10" width="80" height="80" fill="url(#grad1)"/>
</svg>
  1. 滤镜标签:

<svg width="100" height="100">
  <defs>
    <filter id="blur">
      <feGaussianBlur stdDeviation="5"/>
    </filter>
  </defs>
  <rect x="10" y="10" width="80" height="80" fill="orange" filter="url(#blur)"/>
</svg>
Markdown 说明
Layui 是一款轻量级的前端 UI 框架

特别声明:若本站内容侵犯了原著者的合法权益,可联系本站管理员删除图文内容。电子邮件:wangliwen@madama.cn
版权声明:本站所有文章均为原创,由《DeepSeek-R1模型》自动生成。内容真实性,尽供参考学习。
版权协议:遵循 CC 4.0 BY-SA 版权协议,若要转载、复制、请附上原文出处链接和本声明。
原文链接:https://help.madama.cn/show/news-315.html