两个问题 1:width 是否也需要在tr 中每行都要设置 2:怎么设置orange那行 两头的长度
来源:3-4 编程练习
悉尼audrey
2019-10-23 09:11:11
<!-- 在此编写代码 -->
<table width="100%">
<tr width="100%" bgcolor="pink" height="80px"><td>页头</td></tr>
<tr width="100%" bgcolor="white" height="10px"><td></td></tr> <!--空白行-->
<tr width="100%" bgcolor="orange">
<td>
<table align="center">
<tr>
<td bgcolor="white" width="240px">左侧内容</td>
<td width="20px"></td> <!--中间空白-->
<td bgcolor="white" width="764px">右侧内容</td>
</tr>
</table>
</td>
</tr>
<tr width="100%" bgcolor="white" height="10px"><td></td></tr>
<tr width="100%" bgcolor="black" height="80px"><td></td></tr>
</table>
1回答
你好同学,解答如下:
不需要给tr设置宽度,因为tr就表示的一整行,即table多宽它就多宽。把tr设置的宽度去掉哦
是说的如下橙色区域吗?没有办法设置
因为它就是一行减去中间的表格剩余的空间,也不需要设置。同学的代码已经实现效果了,把tr宽度去掉就可以了哦
祝学习愉快,望采纳。
相似问题