亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Namespace prefix xlink問題

我寫出來的代碼會有這樣的問題:

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.


正在回答

1 回答

哦,寫在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'>

? ? ? ? ? ? 這個文字先上去,又下來了。Upside down in english!

? ? ? ? </textpath>

? ? </text>

</svg>

</body>

</html>


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
走進SVG
  • 參與學習       52694    人
  • 解答問題       223    個

SVG是HTML5 中矢量圖的標記語言,學習后掌握更多的干貨

進入課程

Namespace prefix xlink問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號