img src SVG changing the styles with CSS

后端 未结 22 1973
予麋鹿
予麋鹿 2020-11-22 01:16

html

\"Logo\"

css

.logo-img path {
           


        
22条回答
  •  长情又很酷
    2020-11-22 01:52

    If you have access to JQuery, then extending to Praveen's answer one can programatically change color of different nested elements inside SVG by:

    $('svg').find('path, text').css('fill', '#ffffff');

    Within find, you can mention different elements that needs to be changed in color.

提交回复
热议问题