Ecco un code demoSalvataggio automatico di un file SVG?
Ho un file SVG con un'altezza sconosciuta. Posso capirlo dopo aver caricato in json e usare javascript + math ma c'è qualche css che posso usare per ridimensionarlo dinamicamente?
css:
svg {
width: 500px;
height: 9000px;
}
.tabme {
border:3px solid red;
height: 200px;
overflow:scroll;
}
html:
<div class="tabme">
<div id="Chart">
<div class="chartbody" />
<svg>
<rect width="190" y="0" height="16" x="175" />
<rect width="190" y="20" height="16" x="175" />
<rect width="190" y="40" height="16" x="175" />
<rect width="190" y="60" height="16" x="175" />
<rect width="190" y="80" height="16" x="175" />
<rect width="190" y="100" height="16" x="175" />
<rect width="190" y="120" height="16" x="175" />
<rect width="190" y="140" height="16" x="175" />
<rect width="190" y="160" height="16" x="175" />
<rect width="190" y="180" height="16" x="175" />
<rect width="190" y="200" height="16" x="175" />
<rect width="190" y="220" height="16" x="175" />
<rect width="190" y="240" height="16" x="175" />
<rect width="190" y="260" height="16" x="175" />
<rect width="190" y="280" height="16" x="175" />
<rect width="190" y="300" height="16" x="175" />
</svg>
</div>
</div>
svg {altezza: 100%; larghezza: auto} può essere? E funzionerà come un'immagine e sarà 200px in altezza, e lo salverà rapporto .. – Flops
@Flops: auto non funziona. Inoltre volevo altezza – BruteCode