#diagram { width: 100%; margin: auto; display: block; .line { stroke-dasharray: 5; // animation: draw 1s ease-in; } } @keyframes draw { from { stroke-dashoffset: -1400; } to { stroke-dashoffset: 0; } } @keyframes dude { 0% { width: 0; } 100% { width: 100%; } }