版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenbetter1996/article/details/83038748
table {
border: #f2d69c 10px groove;
width: 95%;
padding: auto;
margin-left: 2.5%;
margin-right: 2.5%;
}
设置成这样
如果数据很长的话,会突破95%长度
添加下面的样式设置即可解决
td {
/* 保证数据不会挤爆拉长表格宽度,到点就换行 */
word-break: break-all;
}