0
我在下面有HTML标记。我需要将包含表格的div的大小减半,所以基本上是overflow:hidden,并且只显示包含在指定大小内的div的一部分。不过,包含div的高度属性未应用于表格。如何缩小包含表格的div的大小
<html>
<head>
<title>Test</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
.temp{
height: 20px;
}
</style>
</head>
<body>
<div class="temp">
<table border="1">
<tr>
<td>This is a test.</td>
<td>Do you see what I mean?</td>
<td>I hate this overflow.</td>
</tr>
</table>
</div>
</body>
</html>
您的示例生成一行文本。你想让它只显示文本的上半部分吗? –
愚蠢的我......很明显...... – Mayumi