table td超出宽度,不换行,不撑开td

                    <tr>
                        <th width="40" class="textCenter numberCol">序号</th>
                        <th width="80" class="textCenter goodsNameCol">商品名称</th>
                        <th width="80"   class="textCenter companyCol">单位</th>
                        <th  width="50"  class="textCenter reserveCol">预定</th>
                        <th  width="50"  class="textCenter receiptsCol">实收</th>
                        <th  width="50"  class="textCenter purchasePriceCol">采购价</th>
                        <th  width="50"  class="textCenter floatingRatioCol" >上浮</th>
                        <th  width="50"  class="textCenter priceCol">售价</th>
                        <th  width="50"  class="textCenter moneyCol">总价</th>
                        <th  class="textCenter remarkCol">备注</th>
                    </tr>

如何让下边的td中的内容超出宽度,不换行,不撑开td。CSS该如何写。

阅读 3.3k
1 个回答

给table设置css

table{
      table-layout:fixed !important;
      width:100%;
    }
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题