gpt4 book ai didi

css - 最小高度 : auto not working in Opera

转载 作者:技术小花猫 更新时间:2023-10-29 11:00:10 26 4
gpt4 key购买 nike

我注意到 min-height 在 Opera 中不起作用。我正在尝试这样的事情:

<div class="content"><div>
<div class="content newstyle"><div>

我的 CSS 代码是:

.content {
min-height: 600px;
}
.newstyle {
min-height: auto;
}

Opera 就像 min-height 不存在一样。
如果我在 .newstyle 中应用任何其他样式,如背景或其他任何样式,那么它会很好地工作。但是 min-height: auto 似乎不起作用...

有什么想法吗?

最佳答案

CSS2.1 defines the initial value of min-height to be 0, not auto. auto 值在 CSS2.1 中不存在,因此在 CSS2.1 中无效。只需使用 min-height: 0 代替:

.content {
min-height: 600px;
}
.newstyle {
min-height: 0;
}

关于css - 最小高度 : auto not working in Opera,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13070456/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com