【发布时间】:2017-01-24 09:52:57
【问题描述】:
Safari 使 child 块的高度大于 Chrome。
我需要在 Chrome 和 Safari 中实现相同的阻止行为。
Chrome 中的填充会影响child's height。 Safari 中的填充与height 相加。
.body {
display: flex;
justify-content: flex-start;
flex-direction: column;
height: 100%;
}
.header {
height: 60px;
width: 100%;
}
.ctn {
height: 100%;
width: 100%;
padding-bottom: 80px;
}
.ctn__child {
min-width: 100%;
height: 100%;
}
【问题讨论】:
-
你试过加
box-sizing: border-box吗? jsfiddle.net/zqjpzLLb/1 -
在 Safari 中的这个小提琴填充小于 Chrome 中的填充
-
寻求调试帮助的问题(“为什么这段代码不起作用?”)必须在问题本身中包含所需的行为、特定问题或错误以及重现它所需的最短代码 。没有明确问题陈述的问题对其他读者没有用处。请参阅:如何创建最小、完整和可验证的示例。
标签: html css google-chrome safari flexbox