三次贝塞尔曲线与 SVG 路径

For those who don’t know about SVGs, they use XML markup to describe a vector image. Unlike traditional images, vector graphics are lossless which means that they can be scaled to any size and always have crisp edges.

对于那些不了解SVGs的人,它们使用XML标记来描述矢量图像。与传统图像不同,矢量图形是无损的,这意味着它们可以缩放到任何大小,并且始终具有清晰的边缘。

One great use case of vector images is in web development since they can be embedded into a webpage using the tag. This allows you to place these lossless images into your own webpage allowing for many possibilities from extremely crisp images, to customizable animations and effects. Additionally since it is not an image it doesn’t slow down webpage load time nearly as much as a raster image would since the svg is defined as text much like any other html element and rendered by the browser.

矢量图像的一个极佳用例是在网页开发中,因为它们可以使用 标签嵌入到网页中。这允许您将这些无损图像放入您自己的网页中,从而提供从极其清晰的图像到可自定义的动画和效果的多种可能性。此外,由于它不是图像,它不会像光栅图像那样大幅减慢网页加载时间,因为 svg 被定义为文本,就像任何其他 html 元素一样,并由浏览器渲染。

One of the easiest ways to create an svg image is to use a vector graphics editor such as Adobe Illustrator or Inkscape. While these editors do a great job of creating a vector graphic for you, their output can be a bit bulky and often has far more data in the svg tag than is really required (although the newest release of Illustrator has improved this quite considerably).

创建svg图像最简单的方法之一是使用矢量图形编辑器,如Adobe Illustrator或Inkscape。虽然这些编辑器能很好地为您创建矢量图形,但它们的输出可能有些臃肿,并且svg标签中通常包含比实际需要多得多的数据(尽管最新版本的Illustrator在这方面有了相当大的改进)。

<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" id="svg8" version="1.1" viewBox="0 0 26.458333 13.229167" height="500" width="250"> rdf:RDF <cc:Work rdf:about=""> dc:formatimage/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> dc:title</dc:title> </cc:Work> </rdf:RDF>

<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#"...

开通本站会员,查看完整译文。

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-21 21:45
浙ICP备14020137号-1 $Carte des visiteurs$