Skip to content

Commit

Permalink
Update files/zh-cn/learn/html/multimedia_and_embedding/adding_vector_…
Browse files Browse the repository at this point in the history
…graphics_to_the_web/index.md

Co-authored-by: A1lo <[email protected]>
  • Loading branch information
abing22333 and yin1999 committed Sep 20, 2024
1 parent 9e13c71 commit 2eb988f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SVG 除了前面描述的以外还有其他优点:

### 快捷方式:`img` 元素

要通过 {{htmlelement("img")}} 元素嵌入 SVG,你只需要按照预期的方式在 src 属性中引用它。你将至少需要 `height``width` 属性中的一个(或者如果你的 SVG 没有固有的 {{glossary("aspect ratio","宽高比")}},则都需要)。如果你还没使用过 `img` 元素,请阅读 [HTML 中的图片](/zh-CN/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML)教程。
要通过 {{htmlelement("img")}} 元素嵌入 SVG,你只需要按照预期的方式在 src 属性中引用它。你将至少需要 `height``width` 属性中的一个(或者如果你的 SVG 没有固有的{{glossary("aspect ratio","宽高比")}},则都需要)。如果你还没使用过 `img` 元素,请阅读 [HTML 中的图片](/zh-CN/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML)教程。

```html
<img src="equilateral.svg" alt="等边三角形" height="87px" width="100px" />
Expand Down

0 comments on commit 2eb988f

Please sign in to comment.