How do I apply CSS styles to Raphael.js objects using jQuery?

后端 未结 3 847
小鲜肉
小鲜肉 2021-02-15 02:30

Does anybody have any experience with the Raphael.js SVG library?

I\'m using Raphael.js to create an SVG map (for use on smartphones) but I\'m having trouble opening the

3条回答
  •  盖世英雄少女心
    2021-02-15 03:09

    I also found that if you remove the inline styles after rendering the path with raphael.

    $('#somediv path').removeAttr('fill').removeAttr('stroke');
    

    then you can style them how ever you want using css

    #somediv path { fill: white; }
    #somediv:hover path { fill: blue; }
    

提交回复
热议问题