在我的 mvc
应用程序中,我添加了一个 div
和 height:270px
。
<style type="text/css">
.table-div {
height: 270px;
margin-top: -20px;
border-top: 2px solid #DDD;
border-bottom: 2px solid #DDD;
margin-right: 10px;
margin-left: 10px;
background-color: white;
}
</style>
它在 firefox
中运行良好。但是如果我在 Chrome
中打开它,那么它的高度看起来会超过 270px
。为什么会这样?如何解决?
最佳答案
可能是元素 height.border-top 和 border-bottom 应该加上 270。
关于html - Div 高度属性在 Chrome 中无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36446634/