How do I remove the gray border that surrounds background images?

前端 未结 13 1799
挽巷
挽巷 2020-12-09 01:09

I\'ve come across an interesting problem in the following line of code:

  

        
相关标签:
13条回答
  • 2020-12-09 01:51

    You can also add a blank image as a place holder:

    img.src='data:image/png;base64,R0lGODlhFAAUAIAAAP///wAAACH5BAEAAAAALAAAAAAUABQAAAIRhI+py+0Po5y02ouz3rz7rxUAOw=='
    

    This should do the trick!

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