css “background-image” shows unwanted border, img “src” does not

后端 未结 5 661
长情又很酷
长情又很酷 2021-02-07 08:06

Getting started with Twitter Bootstrap, I ran into a strange problem of which I can\'t figure out the cause.

When I render an image using:



        
5条回答
  •  梦毁少年i
    2021-02-07 08:49

    For people running into this situation, the actual solution to the problem in question (as opposed to people telling you "just don't do that") is to set the src of the image to a blank image; preferably a 1x1 image to reduce load size, and optionally even as an incorporated base64 URI to eliminate the additional HTTP request (depending on which solution is more appropriate).

    So from the OP's example, the altered code:

    
    

    or

    
    

提交回复
热议问题