2
파란색 선 (atm 100 %)의 길이를 70 %까지 조정하려면 어떻게해야합니까?jQuery로 SVG 경로 길이 조작
바이올린 http://jsfiddle.net/7FP3J/2/
HTML
<div id="p0">0%</div>
<div id="p100">100%</div>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path fill="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke="#0074c4" d="M80,80 A80,80 0 1,180.61117636732928,100.45116865416591" stroke-width="3" id="test"/>
</svg>
CSS
#p0 {
color: #0074c4;
left: 60px;
position: absolute;
top: 72px;
}
#p100 {
color: #0074c4;
left: 240px;
position: absolute;
top: 144px;
}
JS
setCircleTo(70);
function setCircleTo(percent)
{
// percent
// $('#test').attr('d','')
}
덕분에 (모든 시간) 블루해야한다 :/http://jsfiddle.net/7FP3J/21/ – Peter
뜻합니까 이거? http://jsfiddle.net/7FP3J/23/ 그렇지 않다면, 내가 따르지 않기 때문에 원하는 것에 대한 더 나은 설명으로 질문을 편집해야 할 수도 있습니다. –