我当然有IE的麻烦。 SVG元素未出现在浏览器中。有人可以帮我吗?
这是我的代码
svg(preservAspectRatio='none', length='rem(250px)', height='1px', viewbox='0 0 250 1', version='1.1', xmlns='http://www.w3.org/2000/svg', xmlns:xlink='http://www.w3.org/1999/xlink')
defs
g#Page-1(stroke='none', stroke-width='1', fill='none', fill-rule='evenodd', opacity='0.400000006', stroke-dasharray='10,10', stroke-linecap='square')
g#Pre-Order(transform='translate(-505.000000, -1162.000000)', stroke='#7A8EA5')
g#Group-6(transform='translate(475.000000, 1135.000000)')
path#Line(d='M30.5,27.5 L949.606631,27.5')`
答案 0 :(得分:2)
可以使用纯SVG
吗?
根据SVG语法规则重写代码。
该应用程序可在所有浏览器中使用。
<svg width="250" height="1", viewbox='0 0 250 1' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<g id="Page-1" stroke='none' stroke-width='1', fill='none' fill-rule='evenodd' opacity='0.4', stroke-dasharray='10,10' stroke-linecap='square'>
<g id="Pre-Order" transform='translate(-505.000000, -1162.000000)' stroke='#7A8EA5')>
<g id="Group-6" transform='translate(475.000000, 1135.000000)'>
<path id="#Line" d='M30.5,27.5 L949.606631,27.5'> </path>
</g>
</g>
</g>
</svg>
如果我正确理解您要在此处获得的信息,则是一个较短的代码:
<svg width="250" height="1", viewbox='0 0 250 1' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<g id="Page-1" stroke='black' stroke-width='1', fill='none' fill-rule='evenodd' opacity='0.4', stroke-dasharray='10,10' stroke-linecap='square'>
<path id="#Line" d='M0 1 L250 1'> </path>
</g>
</svg>