CSS - Style svg fill with class name

后端 未结 2 1725
旧巷少年郎
旧巷少年郎 2021-01-21 13:37

I have a jsfiddle here - http://jsfiddle.net/morettmt/v7mx737w/2/

I can chnage the fill color by styling the grouping

Is there a way to add my own class to the s

2条回答
  •  一向
    一向 (楼主)
    2021-01-21 14:12

    Your problem is that the colour from your class style, was being over-ridden by the explicit fill you had on the child element. If you remove that, your CSS works.

    .triangle{
    	fill: red;
    }
    
    	    
    	    
    	        
    	            
    	        
    	    
    	

提交回复
热议问题