Home >Web Front-end >HTML Tutorial >The div height and width disappear after the div background becomes transparent_html/css_WEB-ITnose

The div height and width disappear after the div background becomes transparent_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:14:33964browse


This layer covers other layers. The background-color:transparent layer becomes 0*0, and the background-color:#555 layer becomes 180*90. It’s a very strange problem


Reply to the discussion (solution)

I tested it under IE8 and chrome browsers, both are normal, and the problem you mentioned did not occur! ! !

You can try adding a border: border:2px solid red;

Or use "Developer Tools" to check the effect~~~

It's not possible, see:
http://jsfiddle.net/gyS7P/
Unless your header is not added, or is added incorrectly, it does not comply with W3C standards.

I tested it under IE8 and chrome browsers, and they are normal, and there is no problem as you mentioned!

You can try adding a border: border: 2px solid red;

or use "Developer Tools" to see the effect~~~
I tested with ie8

It's impossible, see:
http://jsfiddle.net/gyS7P/
Unless your< ;!DOCTYPE HTML ...">The header is not added, or is added incorrectly, and does not comply with W3C standards.
Already added

What you want to cover is an iframe, does it need special processing?

IE6 does not support background-color:transparent;

Already added< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-……
Then put
background -color:transparent;
changed to
background:none transparent;

See
http://jsfiddle.net/gyS7P/1/

My IE8 does not Problem.

It’s not solved yet. Does anyone have a good solution?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn