开发者

css: background-image for tag img doesn't work in IE

开发者 https://www.devze.com 2022-12-24 03:56 出处:网络
i ha开发者_开发百科ve the following script css: img { background-image:url(\"man.png\"); background-repeat:no-repeat;

i ha开发者_开发百科ve the following script

css:
img
{
    background-image:url("man.png");
    background-repeat:no-repeat;
    padding-top:6px;
    padding-bottom:60px;
    padding-left:10px;
    padding-right:10px;
    margin-right:5px;
    border: 0;

}

it works fine in all browsers, but in IE doesn't. could you tall me why? thanks


When applying a background image to an <img> tag, add display: block; to your CSS.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号