如何设置jsp的对齐
4个回答
展开全部
用一个表就可以了:
<table width="100%" border="1">
<tr>
<td width="10%"> <div align="center"> <font color="blue">采集时间 </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">电流(A) </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">电压(V) </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">功率因素 </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">有功功率(kW) </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">无功功率(kWar) </font> </div> </td>
<td width="10%"> <div align="center"> <font color="blue">有功电量 </font> </div> </td>
</tr>
<tr>
<td width="10%"> <div align="center"> <font color="blue">(月日时分) </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">% </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">% </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">总 </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">总 </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">总 </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="10%"> <div align="center"> <font color="blue">(kWh) </font> </div> </td>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td width="10%"> <div align="center"> <font color="blue">采集时间 </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">电流(A) </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">电压(V) </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">功率因素 </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">有功功率(kW) </font> </div> </td>
<td colspan="4" width="16%"> <div align="center"> <font color="blue">无功功率(kWar) </font> </div> </td>
<td width="10%"> <div align="center"> <font color="blue">有功电量 </font> </div> </td>
</tr>
<tr>
<td width="10%"> <div align="center"> <font color="blue">(月日时分) </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">% </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">% </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">总 </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">总 </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">总 </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">A </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">B </font> </div> </td>
<td width="4%"> <div align="center"> <font color="blue">C </font> </div> </td>
<td width="10%"> <div align="center"> <font color="blue">(kWh) </font> </div> </td>
</tr>
</table>
展开全部
algin属性啊 。或者你直接写css文件也可以
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
algin="center"
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
algin="center"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询