开发者

PNG image showing up with white background even though it has a clear background

开发者 https://www.devze.com 2023-02-15 16:00 出处:网络
I have a facebox window with a close 开发者_开发知识库button that i want to be exactly like on uservoice.com (click the feedback link on the bottom right you\'ll see what i mean. I have added that ima

I have a facebox window with a close 开发者_开发知识库button that i want to be exactly like on uservoice.com (click the feedback link on the bottom right you'll see what i mean. I have added that image as the close button, but when it appears in my browser it shows a white background. The image is supposed to have a clear background. Any idea how to make it show as transparent? Here's an image of what i'm talking about: http://i.stack.imgur.com/jfxC1.png

Here's the CSS for the close button:

    #facebox .close{

  position:absolute;
  top:-22px;
  right:-24px;
  padding:2px;
  background:#fff;
}
#facebox .close img{
  opacity:0.3;
}
#facebox .close:hover img{
  opacity:1.0;
}


On #facebox .close, remove background: #fff.

That should be all you need to do. Although, I can't see where you're setting the background-image.


#facebox .close{
  position:absolute;
  top:-22px;
  right:-24px;
  padding:2px;
  background:#fff;
}

probably the background:#fff; here.

0

精彩评论

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

关注公众号