JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
Role para baixo
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<path d="M435.2,392.533c-23.526,0-42.667,19.14-42.667,42.667s19.14,42.667,42.667,42.667c23.526,0,42.667-19.14,42.667-42.667
S458.726,392.533,435.2,392.533z M435.2,460.8c-14.114,0-25.6-11.486-25.6-25.6s11.486-25.6,25.6-25.6s25.6,11.486,25.6,25.6
S449.314,460.8,435.2,460.8z"/>
<path d="M494.933,387.029V102.4c0-9.412-7.654-17.067-17.067-17.067h-85.333c-9.412,0-17.067,7.654-17.067,17.067v230.4
c0,4.71,3.814,8.533,8.533,8.533h17.067c4.719,0,8.533-3.823,8.533-8.533c0-4.71-3.814-8.533-8.533-8.533h-8.533V307.2h8.533
c4.719,0,8.533-3.823,8.533-8.533s-3.814-8.533-8.533-8.533h-8.533v-17.067h25.6c4.719,0,8.533-3.823,8.533-8.533
S422.852,256,418.133,256h-25.6v-17.067h8.533c4.719,0,8.533-3.823,8.533-8.533c0-4.71-3.814-8.533-8.533-8.533h-8.533V204.8
h8.533c4.719,0,8.533-3.823,8.533-8.533s-3.814-8.533-8.533-8.533h-8.533v-17.067h8.533c4.719,0,8.533-3.823,8.533-8.533
c0-4.71-3.814-8.533-8.533-8.533h-8.533v-17.067h25.6c4.719,0,8.533-3.823,8.533-8.533c0-4.71-3.814-8.533-8.533-8.533h-25.6
V102.4h85.333v268.988c-12.22-8.201-26.88-12.988-42.667-12.988c-42.351,0-76.8,34.458-76.8,76.8
c0,15.778,4.796,30.455,12.979,42.667H136.533v-85.333H153.6v25.6c0,4.71,3.823,8.533,8.533,8.533
c4.71,0,8.533-3.823,8.533-8.533v-25.6h17.067v8.533c0,4.71,3.823,8.533,8.533,8.533s8.533-3.823,8.533-8.533v-8.533h17.067
v8.533c0,4.71,3.823,8.533,8.533,8.533s8.533-3.823,8.533-8.533v-8.533H256v8.533c0,4.71,3.823,8.533,8.533,8.533
...
CSS
svg {
width: 157px;
height: 157px;
fill: red;
margin-left: 130px;
}
svg path {
stroke: #310B3B;
}
svg:not(:root) {
overflow: visible;
}
path {
fill: transparent;
}
svg > span {
position: absolute;
top: 0;
right: 0;
}
path, line, polyline {
stroke: #fff;
stroke-width: 1px;
}
polyline {
stroke-width: 4px;
}
#Layer_1 path {
stroke-width: 6.5px;
}
JavaScript
/*
* Walkway.js
*
* Copyright 2016, Connor Atherton - http://connoratherton.com/
* Released under the MIT Licence
* http://opensource.org/licenses/MIT
*
* Github: http://github.com/ConnorAtherton/Walkway
*/
// Export Walkway depending on environment (AMD, CommonJS or Browser global)
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
} else if (typeof exports === 'object') {
// CommonJS
module.exports = factory();
} else {
// Browser globals
root.Walkway = factory();
}
}(this, function factory(exports) {
'use strict';
/*
* Shim for requestAnimationFrame on older browsers
*/
var lastTime = 0;
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
window.cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() {
callback(currTime + timeToCall);
}, timeToCall);
lastTime = currTime + timeToCall;
return id;
};
}
if (!window.cancelAnimationFrame) {
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};
}
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*
* Taken from https://gist.github.com/gre/1650294
*/
var EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t; },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t; },
// decelerating to zero velocity
easeOutQuad: function (t) { return t*(2-t); },
//...