| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>table</title>
- <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
- <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.0-beta2/css/bootstrap-grid.css" rel="stylesheet">
- <style type="text/css">
- #test th{
- position: sticky;
- position: -webkit-sticky;
- top: 0;
- z-index:999;
- background-color: white;
- }
- </style>
- <link href="{{ mix('css/app.css') }}" rel="stylesheet">
- </head>
- <body>
- <button></button>
- <table id="table" cellspacing="0" cellpadding="2" width="100%" border="1">
- <tr id="test" style="white-space: nowrap !important;">
- <th >用户编号</th>
- <th>试用时间</th>
- <th>转正时间</th>
- <th>生日时间</th>
- <th>民族</th>
- <th>身高</th>
- </tr>
- <tr>
- <td style="overflow-x: hidden">200004512312312321321</td>
- <td><div>2001-2-15</div></td>
- <td><div>2001-2-15</div></td>
- <td>1978-8-5</td>
- <td>汉</td>
- <td>162</td>
- </tr>
- </table>
- <script type="text/javascript">
- document.oncopy = () => { // 监听浏览器复制事件
- event.preventDefault();
- let content = window.getSelection().toString();
- event.clipboardData.setData("text", content.replace(/[\n\r]/g,' '));
- };
- </script>
- </body>
- </html>
|