Do I use , <>, >

后端 未结 15 2152
借酒劲吻你
借酒劲吻你 2020-11-22 06:10

Should I use , , or for loading SVG files into a page in a way similar to loading a jpg
15条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 06:54

    In most circumstances, I recommend using the tag to display SVG images. It feels a little unnatural, but it's the most reliable method if you want to provide dynamic effects.

    For images without interaction, the tag or a CSS background can be used.

    Inline SVGs or iframes are possible options for some projects, but it's best to avoid

    But if you want to play with SVG stuff like

    • Changing colors
    • Resize path
    • rotate svg

    Go with the embedded one

    
         
             
        
    
    

    提交回复
    热议问题