IE和透明背景 [英] IE and Transparent Backgrounds

查看:143
本文介绍了IE和透明背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下css:

  body {
background-image:url(images / background.jpg );
background-repeat:repeat-x;
background-color:#99ccff;不幸的是,在此页面上创建的任何div现在都自动使用这种颜色。

  bacgkround:none;如果应用于页面上的任何div, 
background:transparent;
bacgkround-color:none;
background-color:transparent;

任何人都知道如何解决这个问题(在IE中)?
ie如何使div透明或不具有背景颜色?



编辑:
我在这里上传了一个屏幕截图: http://www.namhost .com / bgtrans.jpg
基本上,背景是一个渐变图像,从深蓝色变成浅蓝色,这是背景。在firefox中,说bradd pitt的区域是透明的,



这里是Firefox中可以看到的屏幕截图: http://www.namhost.com/bgtransfirefox.jpg

解决方案

不确定这里出错了什么(如果任何事情都出错了),transparent和none意味着div不应该有自己的颜色,因此你会看到通过div到父容器的背景....如果父项没有一个颜色,那么你将看到正文/页面的背景


I have the following css:

body {
     background-image: url(images/background.jpg);
     background-repeat: repeat-x;
     background-color: #99ccff;
}

Unfortunately, any div created on this page, now automatically has this colour. None of the following works if applied to any divs on he page (it still takes on the above colour.

bacgkround: none;
background: transparent;
bacgkround-color: none;
background-color: transparent;

Anybody know how to get around this (in IE)? i.e. How do I make the div transparent or NOT have a background color?

EDIT: I've uploaded a screenshot here: http://www.namhost.com/bgtrans.jpg Basically, the background is a gradient image that changes from DARK blue, to the light blue that is the background. In firefox, the area that says bradd pitt, is transparent and you dont see the blue outline. However, in IE, you see what you see in that screenshot.

Here's a screenshot of what can be seen in Firefox: http://www.namhost.com/bgtransfirefox.jpg

解决方案

not sure whats going wrong here (if anything is going wrong at all), transparent and none mean that the div shouldnt have its own colour and therefore you will see through the div to the background of the parent container....if none of the parents have a colour then you will see the background of the body/page

这篇关于IE和透明背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆