https://github.com/shaadh/tunnel-gallery
这是我添加的javascript动画片段路径中svg圈标记的半径
function tunnel_gallery()
{
timerFunction = setInterval(tunnelanimate, 20);
}
function tunnelanimate()
{
var clip = document.getElementById("circle1");
var rad = clip.getAttribute("r");
var tunnel_width = jQuery("#tunnel-mask").parent().width();
var newrad = 2 + parseInt(rad);
if (newrad > tunnel_width)
{
clearInterval(timerFunction);
clip.setAttribute("r", 0);
timerFunction = null;
}
else
{
clip.setAttribute("r", newrad);
}
}