svg { margin-left:100px; border:1px solid #f00; } path { stroke-dasharray:1000; stroke-dashoffset:1000; -webkit-animation:dash 5s linear infinite; animation:dash 3s linear infinite; } @-webkit-keyframes dash { to { stroke-dashoffset:0; } }@keyframes dash { to { stroke-dashoffset:0; } }