svg not sharp, but blurry

后端 未结 3 924
北荒
北荒 2021-01-02 01:10

For whatever reason these svg files, seems blurry, and not 100% sharp in all browsers. These are svg files, and are enclosed within elements that are scaled to pixe

3条回答
  •  走了就别回头了
    2021-01-02 01:24

    If you want your SVG to be at its sharpest, then design it so that its shapes - especially the horizontal and vertical parts of the shapes - are on pixel boundaries.

    For example, compare the following two examples:

    
      
    
    
    
      
    

    Here's what this looks like at 4X enlargement.

    Any time your shape passes through the middle of pixels, you will get grey pixels due to the anti-aliasing that 2D renderers use.

提交回复
热议问题