Opera div高度错误 [英] Opera div height bug

查看:59
本文介绍了Opera div高度错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以确认这一点:
http:// www。 purpleray.za.net/opera_bug.html

Can someone confirm this:
http://www.purpleray.za.net/opera_bug.html

推荐答案

" Francois du Toit" < FR ************ @ gmail.com>写道:
"Francois du Toit" <fr************@gmail.com> wrote:
有人可以证实这一点:
http://www.purpleray.za.net/opera_bug.html
Can someone confirm this:
http://www.purpleray.za.net/opera_bug.html




div.l的包含块是div。 bug(*不是* div.h,因为它是

位置是静态的),但div.bug的高度为100%,这不是
在你的例子中计算到一个定义的高度。


我会提交一个bug @ Mozilla。


-

Spartanicus



The containing block for div.l is div.bug (*not* div.h since it''s
position is static), but div.bug has a height of 100%, which doesn''t
compute to a defined height in your example.

I''d file a bug @ Mozilla.

--
Spartanicus


好的我想我知道你在说什么,但是这个怎么样:


在歌剧中你得到一个红色的块 - 在firefox中有一个蓝色块。不应该
div.l从div.h继承高度吗?


< style type =" text / css">< ! -

div.rel {

背景颜色:红色;

位置:相对;

剩下:10px;

top:10px;

宽度:50%;

}


div .h {

身高:100px;

宽度:100%;

}


div .l {

宽度:100%;

身高:100%;

背景颜色:蓝色;

位置:绝对;

左:0px;

顶部:0px;

}


- >< / style>

< / head>

< body>


< div class =" rel">

< div class =" h">

< div class =" l">< / div>

< / div>

< / div>


< / body>

< / html>

Ok I think I see what you''re saying, but what about this:

In opera you get a red block - and in firefox a blue block. Shouldn''t
div.l inherit the height from div.h ?

<style type="text/css"><!--
div.rel {
background-color: red;
position: relative;
left: 10px;
top: 10px;
width: 50%;
}

div.h {
height: 100px;
width: 100%;
}

div.l {
width: 100%;
height: 100%;
background-color: blue;
position: absolute;
left: 0px;
top: 0px;
}

--></style>
</head>
<body>

<div class="rel">
<div class="h">
<div class="l"></div>
</div>
</div>

</body>
</html>


" Francois du Toit" < FR ************ @ gmail.com>写道:
"Francois du Toit" <fr************@gmail.com> wrote:
好吧我想我看到你在说什么,但是这个怎么样:

在歌剧中你得到一个红色的块 - 并在Firefox中一块蓝色的块。不应该div.l从div.h继承高度吗?
Ok I think I see what you''re saying, but what about this:

In opera you get a red block - and in firefox a blue block. Shouldn''t
div.l inherit the height from div.h ?




不,和其他例子一样。
< br $>
-

Spartanicus



No, same reason as with the other example.

--
Spartanicus


这篇关于Opera div高度错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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