N
N
nomta2017-06-22 16:50:04
HTML
nomta, 2017-06-22 16:50:04

Which is better - svg sprite or pasting the code directly in css?

If only svg is supposed to be used, only for new browsers, do I need to create a sprite or can I put the svg code directly into css styles? What is better for performance and what pitfalls can there be?
My case is a third-party js plugin that adds its own markup, in which I, in turn, need to insert svg, with hover effects. In principle, the plugin provides any insertion option, directly in HTML is even more convenient. Plus, the usual icons on the page, it seems like a sprite is the most convenient here. If you combine both approaches, will it not be perceived as a mess in the code?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stas Melnikov, 2017-06-22
@nomta

Watch this video

S
Sasha, 2017-06-22
@userAlexander

nomta , if possible, insert svg code into html using svg use
logo can be in css.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question