<html> <head> <title>table新增水平滚动条</title> <style type="text/css"> .tableWrap { overflow: auto; } table{ width: 100% } table th{ white-space: nowrap; } table td{ white-space: nowrap; } </style> </head> <body> <div class="tableWrap"> <table> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> <tr><td>2222</td><tr> </table> </div> </body> </html>
原文地址:https://www.cnblogs.com/Harold-Hua/p/11804143.html
时间: 2024-11-06 07:24:17