SVG作为数据URI不渲染 [英] SVG as data URI not rendering
问题描述
这可能只是一个语法错误,但我找不到任何彻底的参考这种用法。
It's probably just a syntax error but I can't find any thorough references on this kind of usage. Chrome is overstriking my background property, so I've obviously offended something.
我想要在红色框(svg css背景)中呈现就像html中的内联svg。简单,对吧?
I want what's in the red box (an svg css background) to render just like the inline svg in the html. Simple, right?
不要说它不能做!我的灵感来自: http://jsfiddle.net/estelle/SJjJb/
Don't say it can't be done! My inspiration is this: http://jsfiddle.net/estelle/SJjJb/
推荐答案
您尚未转义url()语法中的'#'字符。它是'viewBox'而不是'viewbox'。
You haven't escaped the '#' characters in the url() syntax. And it's 'viewBox' not 'viewbox'.
这里有一些工作原理: http ://jsfiddle.net/YbA39/3/ (只是一个快速的urlescaped字符串)。
Here's something that works: http://jsfiddle.net/YbA39/3/ (just a quick urlescaped string).
这篇关于SVG作为数据URI不渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!