2017-03-17 2 views
0

정말이 두 텍스트가 줄과 경로를 따라 표시되지 않는 이유가 궁금합니다. 누군가 나를 지적 할 수 있을까요?텍스트 경로가 렌더링되지 않는 이유는 무엇입니까?

<svg width="300px" height="300px"> 
 
    <line id="ok" x1="10" y1="20" x2="100" y2="100" stroke="red" stroke-width=10> 
 
     <text> 
 
     <textPath stroke="black" xlink:href="#ok">OHHHHSUHDIAU</textPath> 
 
     </text> 
 
    </line> 
 
    <path id="io" d="M10,10 L100,10" stroke="blue" stroke-width=10> 
 
     <text> 
 
     <textPath stroke="black" xlink:href="#io">io</textPath> 
 
     </text> 
 
    </path> 
 
    </svg>

답변

0

경우에만 <line> 또는 <path> 요소 내부의 <text>을 배치 <path>

<textPath>을 할 수있는 일은하지 렌더링 할을 일으키는 원인이되었다. 여기

내 추측은 당신이 달성하기 위해 노력하고 무엇이다, 나는이

<svg width="300px" height="300px"> 
 
    <defs> 
 
    <path id="io" d="M10,10 L100,10" /> 
 
    <path id="ok" d="M10,20 L100,100" /> 
 
    </defs> 
 
    <use xlink:href="#io" stroke-width="10" stroke="blue" /> 
 
    <use xlink:href="#ok" stroke-width="10" stroke="red" /> 
 
    <text> 
 
    <textPath stroke="black" xlink:href="#io">io</textPath> 
 
    <textPath stroke="black" xlink:href="#ok">OHHHHSUHDIAU</textPath> 
 
    </text> 
 
</svg>

도움이되기를 바랍니다
관련 문제