3
我花了很大的SVG拆開,發現這個怪異的毛刺(fiddle here)Svg爲文本TSPAN沒有做,因爲它是告訴
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events">
<text>
<tspan x="0" y="1em" z-index="300">Word1</tspan>
<tspan x="0" dy="1em">Word2</tspan>
</text>
</svg>
使用CSS單行:
svg { text-transform: uppercase; }
給人的打錯字包裝:
WORD1W¯¯
ORD2
類型的解決了我自己的問題,但將留在這裏以防萬一任何人發現tspan文字包裝和CSS的問題,並需要知道爲什麼 - 或者可以解釋爲什麼實際發生,答案可能是有用的。
看起來像webkit中的一個bug,提交的網址是https://code.google.com/p/chromium/issues/detail?id=327606。它在Firefox和Opera(Presto)中運行得很好。 –
啊,很感謝Erik! –