在table表格里怎么调节tr上下之间的距离 求助高手
<divid=photo02><tableborder="1"cellspacing="42"cellpadding="0"><trborder="1"align="ce...
<div id=photo02 >
<table border="1" cellspacing="42" cellpadding="0" >
<tr border="1" align="center" >
<td border="1" ><img src="images/light03_1.png"></td>
<td valign="bottom"><img src="images/light03_2.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_5.png"></td>
</tr>
<tr border="1" align="center">
<td ><img src="images/huadongtiao.png"></td>
<td ><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
</tr>
<tr align="center">
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_02.PNG"></td>
</tr>
</table>
上面是代码 table里怎么调节tr上下之间的距离啊 我用cellspacing="42"设置单元格左右之间的间距, 但是单元格上下也跟着变化 怎么能保证这个左右之间的行距的前提下 调整单元格上下之间的距离啊 展开
<table border="1" cellspacing="42" cellpadding="0" >
<tr border="1" align="center" >
<td border="1" ><img src="images/light03_1.png"></td>
<td valign="bottom"><img src="images/light03_2.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_5.png"></td>
</tr>
<tr border="1" align="center">
<td ><img src="images/huadongtiao.png"></td>
<td ><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
</tr>
<tr align="center">
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_02.PNG"></td>
</tr>
</table>
上面是代码 table里怎么调节tr上下之间的距离啊 我用cellspacing="42"设置单元格左右之间的间距, 但是单元格上下也跟着变化 怎么能保证这个左右之间的行距的前提下 调整单元格上下之间的距离啊 展开
展开全部
<html>
<head>
<style>
td {
width="80px";
}
</style>
</head>
<body>
<div id=photo02 >
<table border="1">
<tr border="1" align="center" >
<td border="1" ><img src="images/light03_1.png"></td>
<td valign="bottom"><img src="images/light03_2.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_5.png"></td>
</tr>
<tr border="1" align="center">
<td ><img src="images/huadongtiao.png"></td>
<td ><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
</tr>
<tr align="center">
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_02.PNG"></td>
</tr>
</table>
</div>
</body>
</html>
用css控制td的宽度,cellspacing 属性是规定单元格之间的空间,包括高度和宽度
<head>
<style>
td {
width="80px";
}
</style>
</head>
<body>
<div id=photo02 >
<table border="1">
<tr border="1" align="center" >
<td border="1" ><img src="images/light03_1.png"></td>
<td valign="bottom"><img src="images/light03_2.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_4.png"></td>
<td valign="bottom"><img src="images/light03_5.png"></td>
</tr>
<tr border="1" align="center">
<td ><img src="images/huadongtiao.png"></td>
<td ><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
<td><img src="images/huadongtiao.png"></td>
</tr>
<tr align="center">
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_01.PNG"></td>
<td valign="top"><img src="images/button_02.PNG"></td>
</tr>
</table>
</div>
</body>
</html>
用css控制td的宽度,cellspacing 属性是规定单元格之间的空间,包括高度和宽度
追问
谢谢啊 这个问题已经解决 请问下你做过在上面加上个滑动效果没啊 可以上下滑动的 如下图
追答
这个还没有做过
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询