table的字适应问题

在table标签外层添加div,设置样式style="width:expression(document.body.clientWidth + 'px')"就可以设置table自适应屏幕
<!-- Table -->
  <div style="width:expression(document.body.clientWidth + 'px')">
  <table>
  <tr style="font-size: 11px;color: #8692a2;border-top: 1px solid #eeeeee;border-bottom: 1px solid #eeeeee;">
          <td style="width: 25%;">月本息</td>
          <td style="width: 25%;">月本金</td>
          <td style="width: 25%;">月利息</td>
          <td style="width: 25%;">罚息</td>
          <td style="width: 25%;">还款日期</td>
  </tr>
  <s:iterator value="tenderDetailList" var="tenderDetail">
 
    <tr style="font-size: 10px;color: 8692a2;">
  <td style="width: 25%;border-bottom: 1px solid #eeeeee;">¥<s:property value="m_principalinterest"/></td>
  <td style="width: 25%;border-bottom: 1px solid #eeeeee">¥<s:property value="m_principal"/></td>
  <td style="width: 25%;border-bottom: 1px solid #eeeeee">¥<s:property value="m_interest"/></td>
  <td style="width: 25%;border-bottom: 1px solid #eeeeee">¥<s:property value="m_penalty"/></td>
  <td style="width: 25%;border-bottom: 1px solid #eeeeee">
    <s:date name="m_date" format="yyyy.MM.dd"/>
    <s:if test='"y"  == m_isrepay'>
        <img src="../../../webappimage/yishou.png" style="height: 10px;width: 15px; padding-left: 5px;"/>
    </s:if>
</td>
 
  </tr>
 </s:iterator>
  </table>
 </div>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值