My Wiki!

SVG manipulation

Scaling svg to fit container

<span class="number-big">{{statistics.statisticNumHosts}}</span>
160                             <div class="icon" style="width:25px; height:18px; display: inline-block;" >  -------> container size
161                               <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" 
162                                               x="0px" y="0px"
163                                               viewBox="0 0 51 42"   -----> min-x min-y width height. fit svg in container with width/height ratio.
164                                               preserveAspectRatio='xMaxYMax slice'          ------> bottom right svg fit bottom right container
165                                               style="width: 100%; height: 100%; padding-bottom: 0%, overflow: none"  ----> 100%, hide / show (visible) 
                                                                                overflow.
166                                               xml:space="preserve">

Navigation