本文介绍了在Opera中,margin-bottom的计算方式不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个相对位置的div和一个绝对位置的子div。 $ b
< ; div id =containerclass =out>
< div id =inside>< / div>
< / div>
CSS:
#container {
width:100px;
height:100px;
职位:亲属;
}
#inside {
position:absolute;
top:25px;
left:25px;
right:25px;
bottom:25px;
margin-bottom:24px;
}
Chrome,Safari和Firefox似乎可以正常工作,但Opera浏览器(在Mac中)正在计算margin-bottom两次。
这是一个小提琴:
这是一个错误还是我缺少一些属性?
看起来像在App Store中提供的Opera浏览器是第12版,超过一年半(过去一年)(实际为25)。直接从他们的网站下载并打开jsfiddle不会显示任何冲突。
I have a div with relative position and a children div with position absolute.
<div id="container" class="out">
<div id="inside"></div>
</div>
CSS:
#container {
width:100px;
height:100px;
position: relative;
}
#inside {
position:absolute;
top:25px;
left:25px;
right:25px;
bottom:25px;
margin-bottom:24px;
}
Chrome, Safari and Firefox seem to work correctly but Opera browser (in Mac) is calculating margin-bottom twice.
This a fiddle: http://jsfiddle.net/4fw9wc0o/1/
Is this a bug or am I missing some property?
解决方案
Seems like the Opera browser offered in the App Store is version 12, more than a year and a half outdated (actual is 25). Downloading it directly from their website and opening the jsfiddle doesnt show any conflict.
这篇关于在Opera中,margin-bottom的计算方式不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!