简体   繁体   English

不需要的图标出现在IE8中的图像上

[英]Unwanted Icon appears on image in IE8

I have an image tag under li tag, i have added image using background property, there is an unexpected icon on the image comin in IE8, in FF and chrome works fine. 我在li标签下有一个图像标签,我已经使用background属性添加了图像,在IE8,FF和chrome中,图像中出现了意外图标。

HTML: HTML:

<img class="accordionDown">

CSS: CSS:

.accordionDown {
    background: url('../images/accordian_down.png') no-repeat #E5E4E2;
    height: 35px;
    border: 0;
    display: inline-block;
    float:left;
}

请更改为<img class="accordionDown" src="Path To Image" >

Use a span in place of image , 使用span代替image

And add width and overflow:hidden to you class 并添加widthoverflow:hidden在您的课程中

.accordionDown {
    background: url('../images/accordian_down.png') no-repeat #E5E4E2;
    height: 35px;
    width:35px;/* add width */
    overflow:hidden;/* add overflow */
    border: 0;
    display: inline-block;
    float:left;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM