How to use the SVG icon in css
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!