How to use .svg files in a webpage?

前端 未结 7 1346
长情又很酷
长情又很酷 2021-01-30 19:37

I want to know how can one actually use a .svg file In a web page?

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-30 20:18

    I'd like to agree with the answer from "code-zoop". Although this technically doesn't answer your question, it might also be a solution: enter the relevant data straight into the HTML. Either directly as an svg element, or by using Raphaël-JS.

    From w3c-schools:

    SVG is all suported in In Firefox, Internet Explorer 9, Google Chrome, Opera, and Safari you can

    
    
    
    
      
    
    
    
    
    

    (end of quote)

    And to think even more outside the box, depending on how you want to use it, you can also put your 1-color graphics in a webfont. (see for example iconmoon.io )

提交回复
热议问题