我想在一行中显示两个DIV。每个DIV都应该有另一个DIV。内部DIV应该具有与外部DIV减去边距相同的高度。DIV内部的DIV具有100%的高度减去边距
我无法在DIV内设置适当的高度(忽略下边距)。你能帮助我吗?的jsfiddle:https://jsfiddle.net/gf53e0on/
<body>
<div class="box"><div class="box-in"></div></div>
<div class="box"><div class="box-in"></div></div>
</body>
body {
position: fixed;
width: 100%;
border: none;
display: table;
table-layout: fixed;
padding: 0;
margin: 0;
top: 0;
left: 0;
}
.box {
border: none;
display: table-cell;
height: 100vh;
background-color: yellow;
}
.box-in {
border: solid 1px;
margin-top:10px;
margin-bottom:10px;
margin-left:10px;
margin-right:10px;
height: 100%;
}
当我尝试显示DIV里面的东西与箱类它不工作。 – blaballong
你能不能模糊一点? –