.swidth g path { stroke-linecap:round; animation: hideshow 5s ease infinite; } @keyframes hideshow { 0% { stroke-width:1; } 100% { stroke-width:9; } } #path { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: dash 5s ease infinite; } @keyframes dash { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }