test.blade.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>table</title>
  6. <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  7. <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.0-beta2/css/bootstrap-grid.css" rel="stylesheet">
  8. <style type="text/css">
  9. #test th{
  10. position: sticky;
  11. position: -webkit-sticky;
  12. top: 0;
  13. z-index:999;
  14. background-color: white;
  15. }
  16. </style>
  17. <link href="{{ mix('css/app.css') }}" rel="stylesheet">
  18. </head>
  19. <body>
  20. <button></button>
  21. <table id="table" cellspacing="0" cellpadding="2" width="100%" border="1">
  22. <tr id="test" style="white-space: nowrap !important;">
  23. <th >用户编号</th>
  24. <th>试用时间</th>
  25. <th>转正时间</th>
  26. <th>生日时间</th>
  27. <th>民族</th>
  28. <th>身高</th>
  29. </tr>
  30. <tr>
  31. <td style="overflow-x: hidden">200004512312312321321</td>
  32. <td><div>2001-2-15</div></td>
  33. <td><div>2001-2-15</div></td>
  34. <td>1978-8-5</td>
  35. <td>汉</td>
  36. <td>162</td>
  37. </tr>
  38. </table>
  39. <script type="text/javascript">
  40. document.oncopy = () => { // 监听浏览器复制事件
  41. event.preventDefault();
  42. let content = window.getSelection().toString();
  43. event.clipboardData.setData("text", content.replace(/[\n\r]/g,' '));
  44. };
  45. </script>
  46. </body>
  47. </html>