第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

這節(jié)課是我聽過最迷糊的 老師語速快 手速快 還沒有源代碼下載 想想也是醉了

代碼編寫的視頻還被快進(jìn) 以至于思路跟不上 是不是這樣會(huì)很酷??

正在回答

2 回答

<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title>Document</title>
</head>
<body>
<form?action="">
<label>Path:</label>
<select?id="select">
<option?value="none">none</option>
<option?value="#path1">path1</option>
<option?value="#path2">path2</option>
<option?value="#path3">path3</option>
</select>
</form>

<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?id="path2"?d="M?100?300?l?100-50?200?100?100?-50"?stroke="rgb(255,0,0)"?fill="none"?/>

<path?id="path3"?d="M100?400?A?400?300?0?0?0?500?400"?stroke="blue"?fill="none"/>

<text?id="text"?x="100"?y="100"?style="font-size:20px;">
Text?path?scripting.<tspan?id="tspan">動(dòng)態(tài)使用路徑文本</tspan>
</text>
</svg>
<script>
var?SVG_NS?=?'http://www.w3.org/2000/svg';
var?XLINK_NS?=?'http://www.w3.org/1999/xlink';
var?text?=?document.getElementById('text');
var?select?=?document.getElementById('select');
var?tspan?=?document.getElementById('tspan');

function?addTextPath(){
var?textPath?=?document.createElementNS(SVG_NS,'textPath');
while(text.firstChild){
textPath.appendChild(text.firstChild);
}
text.appendChild(textPath);
}

function?setTextPath(path){
var?textPath?=?text.firstChild;
textPath.setAttributeNS(XLINK_NS,'xlink:href',path);
var?pathElement?=?document.querySelector(path);
tspan.setAttribute('fill',pathElement.getAttribute('stroke'));
}

function?removeTextPath(){
var?textPath?=?text.firstChild;
while(textPath.firstChild){
text.appendChild(textPath.firstChild);
}
text.removeChild(textPath);
tspan.removeAttribute('fill');
}
select.addEventListener('input',function(){
var?value?=?select.value;
if(text.firstChild.tagName&&text.firstChild.tagName.toLowerCase()=='textpath'){
if(value=='none')?{
removeTextPath();
}else{
removeTextPath();
addTextPath();
setTextPath(value);
}
}else{
if(value!='none'){
addTextPath();
setTextPath(value);
}
}
});
</script>
</body>
</html>


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

洪爐百煉生 提問者

非常感謝!
2014-12-16 回復(fù) 有任何疑惑可以回復(fù)我~
#2

洪爐百煉生 提問者

謝謝 手打的么?
2014-12-16 回復(fù) 有任何疑惑可以回復(fù)我~
#3

zdddrszj

不客氣,對(duì)啊
2014-12-17 回復(fù) 有任何疑惑可以回復(fù)我~

視頻重復(fù)看一下,代碼自己打一下就可以了

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

weibo_等再遇見_0

0.0我試了一下,這個(gè)代碼不能運(yùn)行呀
2015-09-13 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

這節(jié)課是我聽過最迷糊的 老師語速快 手速快 還沒有源代碼下載 想想也是醉了

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)