Namespace prefix xlink問(wèn)題
我寫出來(lái)的代碼會(huì)有這樣的問(wèn)題:
This page contains the following errors:
error on line 5 at column 29: Namespace prefix xlink for href on textpath is not defined
Below is a rendering of the page up to the first error.
我寫出來(lái)的代碼會(huì)有這樣的問(wèn)題:
This page contains the following errors:
error on line 5 at column 29: Namespace prefix xlink for href on textpath is not defined
Below is a rendering of the page up to the first error.
2015-02-25
舉報(bào)
2015-02-25
哦,寫在html中就好了,直接寫成svg是不行的;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>textpath</title>
</head>
<body>
<svg xmlns='http://www.w3.org/2000/svg' width='800' height='600'>
? ? <path id="path1" d='M 100 200 Q 200 100 300 200 T 500 200' stroke='rgb(0,255,0)' fill='none'>
? ? </path>
? ? <text style='font-size:24px;'>
? ? ? ? <textpath xlink:href='#path1'>
? ? ? ? ? ? 這個(gè)文字先上去,又下來(lái)了。Upside down in english!
? ? ? ? </textpath>
? ? </text>
</svg>
</body>
</html>