<svg viewBox="0 0 300 50" width="300">
<defs>
<style>
path{
fill: none;
stroke: #000;
stroke-width: 2px;
transition: 0.34s linear;
}
</style>
<marker id="arrow"
viewBox="0 0 10 10"
refX="5"
refY="5"
markerWidth="8"
markerHeight="8"
orient="auto-start-reverse">
<path d="M-20,-20 5,5 -14,24"/>
</marker>
</defs>
<path class="js_path" d="M5,24 100,24" marker-end="url(#arrow)" />
</svg>
<svg viewBox="0 0 400 400"></svg><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.parent{
display: flex;
}
.parent_child{
padding: 30px;
background: red;
margin: 10px;
}
</style>
</head>
<body>
<div class="parent"></div>
<script src="app.js"></script>
</body>
</html>function readTextFile(file, callback) {
var rawFile = new XMLHttpRequest();
rawFile.overrideMimeType("application/json");
rawFile.open("GET", file, true);
rawFile.onreadystatechange = function() {
if (rawFile.readyState === 4 && rawFile.status == "200") {
callback(rawFile.responseText);
}
}
rawFile.send(null);
}
let parent = document.querySelector(".parent");
readTextFile("main.json", function(text){
var data = JSON.parse(text);
for(let i = 0; i<data["723"].children.length; i++){
let block = document.createElement("div");
block.classList.add("parent_child")
parent.append(block)
}
});
<svg width="210mm" height="297mm" version="1.1" viewBox="0 0 210 297" xmlns="http://www.w3.org/2000/svg">
<g fill-rule="evenodd">
<path d="m73.327 135.91v42.409l20.315-4.4317v-36.105z" points="73.327381,178.31548 93.642178,173.88375 93.642178,137.77849 73.327381,135.90663 " fill="#353564"/>
<path d="m73.327 178.32 34.774 14.139 20.858-8.9974-35.317-9.5736z" points="108.10119,192.45477 128.95966,183.45732 93.642178,173.88375 73.327381,178.31548 " fill="#afafde"/>
<path d="m93.642 137.78 35.317-4.0436v49.722l-35.317-9.5736z" points="128.95966,133.73484 128.95966,183.45732 93.642178,173.88375 93.642178,137.77849 " fill="#e9e9ff"/>
<path d="m73.327 135.91 34.774-5.9721 20.858 3.8003-35.317 4.0436z" points="108.10119,129.93452 128.95966,133.73484 93.642178,137.77849 73.327381,135.90663 " fill="#4d4d9f"/>
<path d="m108.1 129.93v62.52l20.858-8.9974v-49.722z" points="108.10119,192.45477 128.95966,183.45732 128.95966,133.73484 108.10119,129.93452 " fill="#d7d7ff"/>
<path d="m73.327 135.91 34.774-5.9721v62.52l-34.774-14.139z" points="108.10119,129.93452 108.10119,192.45477 73.327381,178.31548 73.327381,135.90663 " fill="#8686bf"/>
</g>
</svg>