Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the SVG icon in css

Shulou Source: shulou.com Published: 2022-06-01 06:11:38 11月16日 Update

This article mainly shows you "how to use the SVG icon in css", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the SVG icon in css" this article.

Use the SVG icon

There is no reason not to use the SVG icon:

.logo {background: url ("logo.svg");}

SVG zooms well at all resolutions and supports all browsers after IE9. Discard your .png, .jpg, or .gif-jif-whatev files.

Note: for buttons with only icons, the following styles are helpful for accessibility if SVG does not load successfully:

. no-svg. Icon-only::after {content: attr (aria-label);} above is all the content of the article "how to use the SVG icon in css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Icons content articles help learning good success resolution buttons documents easy to understand more organization style browser reason knowledge editing industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Tech Info Linux vpn Apple