微站长网

又一家网络资讯网站

bootstrap v5.3.0 table表格无法自适应解决办法

可能是我的打开方式不正确吧,加了table-responsive,在手机上还是没有自适应,标题过长就会显示类似两行!

解决办法

给th、td加上以下css即可。

table thead tr th,table tbody tr td{
    text-align: center;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}


发表评论:

控制面板
您好,欢迎到访网站!
  查看权限
站点信息
  • 文章总数:115
  • 页面总数:1
  • 分类总数:16
  • 标签总数:133
  • 评论总数:8
  • 浏览总数:329582

Powered By Z-BlogPHP 1.7.5

Copyright VZZW.COM.All Rights Reserved.
湘ICP备2021010131号-2 51LA统计