Add background image in SVG

前端 未结 1 1368
迷失自我
迷失自我 2021-01-25 18:32

I need to add background image in svg. But I\'m getting only black rectangle box, the image is not displaying. How to add the background image?

This is my code:

1条回答
  •  没有蜡笔的小新
    2021-01-25 18:59

    Correct a syntax error in the path, you are missing a " at the end and remove fill:none from CSS that is overriding the fill attribute used with the path:

    Full code:

    path {
      stroke: #000;
      stroke-width: 3px;
      stroke-linejoin: round;
      stroke-linecap: round;
    }
    
        
    
        
            
                                     
                
        
        
    

    0 讨论(0)
提交回复
热议问题