Removing the image border in Chrome/IE9

后端 未结 18 2045
长情又很酷
长情又很酷 2020-11-27 04:28

I am trying to get rid of the thin border that appears for every image in Chrome & IE9. I have this CSS:

outline: none;
border: none;

U

18条回答
  •  独厮守ぢ
    2020-11-27 05:08

    I liked Randy King's solution in that chrome ignores the "border:none" styling, but its a bit complex to understand and it doesn't work in ie6 and older browsers. Taking his example, you can do this:

    css:

    ins.noborder
    {
        display:block;
        width:102px;
        height:86px;
        background-image:url(/images/download-button-102x86.png);
        background-repeat:no-repeat;
    }
    

    html

    
    

    Make sure when you use the ins tag to close it off with a "" or else the formatting will look funky.

提交回复
热议问题