문제

I need a path that goes UNDER the content (text) - is there a way how to do that?

(as already been answered somewhere else, z-index doesnt affect svg paths)

도움이 되었습니까?

해결책

You can declare PATH and TEXT in different SVG layers, and put one layer onto another like this

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="position:absolute;z-index:1">
  <text x="100" y="15" fill="red">I love SVG</text>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="position:absolute;z-index:0">
  <path d="M150 0 L75 200 L225 200 Z" />
</svg>

http://jsfiddle.net/WJZrU/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top