SVG: Use Attributes or CSS to style?

前端 未结 4 1668
无人共我
无人共我 2021-02-04 02:09

In HTML it is recommended to seperate Content from Style, thus you should create external CSS-Files for your styles. As I am just getting started with SVG I now wonder: Does thi

4条回答
  •  死守一世寂寞
    2021-02-04 02:41

    The difference is always if it's content or it's presentation.

    If the circle is content and it has to show whether or not there css available, then the first option is the one.

    But if the circle is just part of the site disign and doesn't add anything to the content, then it should be the second option. Or use a css class.

提交回复
热议问题