ᴜɴPʟᴜɢ
A golden chance is worth the risk. - Alexander Fleming
We can use SVG in CSS via data URI, but without encoding it works only in Webkit based browsers. If encode SVG using encodeURIComponent()
it will work everywhere.
SVG must have attribute xmlns like this: xmlns='http://www.w3.org/2000/svg'
. If it doesn't exist, it will be added automagically.
Encoded SVG can be used in background
(demos) and border-image
(demo).
We use cookies to understand how you use our site and improve your experience. This includes personalized content and advertising.... Learn more
Join the conversation