你好,我有这段代码:
<html>
<body>
<table>
<tr>
<td>
<div class="the-div">h:100%</div>
</td>
<td>
<div class="the-div-w-height">h:100px</div>
</td>
</tr>
</table>
</body>
</html>
以这种样式,
.the-div
{
height: 100%;
background-color: red;
}
.the-div-w-height
{
height : 100px;
background-color: yellow;
}
我想让红色的div在td内拉伸,其他的div可以根据内容改变高度,第一个div应该与表格一起拉伸
谢谢
td { height: 100% }
)。 - FelipeAls