svg图动态添加svg节点
Do you want to add SVG files to your WordPress site? By default, WordPress allows you to upload all popular image, audio, and video file formats, but SVG is not among them. In this article, we will show you how to easily add SVG in WordPress.
您想将SVG文件添加到WordPress网站吗? 默认情况下,WordPress允许您上传所有流行的图像,音频和视频文件格式,但是SVG不在其中。 在本文中,我们将向您展示如何在WordPress中轻松添加SVG。
什么是SVG? (What is SVG?)
SVG or Scalable Vector Graphics is a file format that defines vector-graphics using the XML markup language. The main benefit of SVG is that it allows you to enlarge images without losing quality or having any pixelation.
SVG或可伸缩矢量图形是一种使用XML标记语言定义矢量图形的文件格式。 SVG的主要优点在于,它可以放大图像而不会降低质量或像素。
How does SVG work?
SVG如何工作?
Scalable Vector Graphics (SVG) is a technology that displays two-dimensional drawings using XML. They are different than the commonly used image formats like PNG, GIF, or JPEGs.
可伸缩矢量图形(SVG)是一种使用XML显示二维图形的技术。 它们与常用的图像格式(如PNG,GIF或JPEG)不同。
If you take a png / jpeg image file and zoom in, then you will notice that the image will start to blur and become pixelated.
如果您拍摄png / jpeg图像文件并放大,则您会注意到图像将开始模糊并变为像素化。
Vector graphics don’t use pixels. Instead, they use a two-dimensional map that defines the graphic you are viewing. As you zoom in, the image doesn’t pixelate.
矢量图形不使用像素。 而是使用二维地图定义您正在查看的图形。 放大时,图像不会像素化。
This enables you to