Forums

Give help. Get help.

  • # September 13, 2017 at 4:56 am

    Hi,

    Why is that I can make little the second svg by reducing width and height, but the first doesn’t work?


    # September 13, 2017 at 5:03 am

    Because in the first one you aren’t using a viewbox.

    See – http://tutorials.jenkov.com/svg/svg-viewport-view-box.html

    The viewBox attribute allows you to specify that a given set of graphics stretch to fit a particular container element.

    The value of the viewBox attribute is a list of four numbers min-x, min-y, width and height, separated by whitespace and/or a comma, which specify a rectangle in user space which should be mapped to the bounds of the viewport established by the given element, taking into account attribute preserveAspectRatio.

    # September 13, 2017 at 5:10 am

    I see! Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag