SVG scaling issues in Safari

后端 未结 1 838
无人及你
无人及你 2020-12-09 22:55

Strange issue occurring in Safari. I\'m setting the background of an element to be an SVG. This SVG was drawn on a tight pixel grid and appears in most every other browser p

相关标签:
1条回答
  • 2020-12-09 23:05

    Okay, so the fix was to add preserveAspectRatio="xMinYMin none" to the SVG element.

    <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"
         width="35px" height="28px" viewBox="0 0 35 28" enable-background="new 0 0 35 28" xml:space="preserve" preserveAspectRatio="xMinYMin none">
    
    0 讨论(0)
提交回复
热议问题