html画table表格

小咪咪 2023-10-03 19:14 129阅读 0赞

代码:

  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <style type="text/css" abt="234">
  6. html{background-color:#FFFFFF;margin:0 auto;max-width:450px; }
  7. body{background: #ffffff;height: 100%; width:100%;text-align:center;}
  8. #main{
  9. font-size:16px;
  10. background: #fbfcfd;
  11. background-size: auto 300px;
  12. background-repeat: no-repeat;
  13. position: absolute; width: 100%; top: 0;
  14. }
  15. table,table tr th, table tr td {
  16. border:1px solid #9AA1A9;
  17. }
  18. table {
  19. width: 95%;
  20. min-height: 25px;
  21. line-height: 25px;
  22. text-align: center;
  23. border-collapse: collapse;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <div id="main">
  29. <div class="table">
  30. <table>
  31. <tr>
  32. <th rowspan="2">病种</th>
  33. <th rowspan="2">合计</th>
  34. <th colspan="7">风险分布</th>
  35. <th rowspan="2">小计</th>
  36. <th rowspan="2">不适合</th>
  37. <th rowspan="2">数据异常</th>
  38. <th rowspan="2">未评估</th>
  39. </tr>
  40. <tr>
  41. <th>小计</th>
  42. <th>已患病</th>
  43. <th>待诊断</th>
  44. <th>很高风险</th>
  45. <th>高风险</th>
  46. <th>中风险</th>
  47. <th>低风险</th>
  48. </tr>
  49. <tr>
  50. <td>高血压</td>
  51. </tr>
  52. </table>
  53. </div>
  54. </div>
  55. </body>
  56. <script>
  57. </script>
  58. </html>

实现效果:

fd84ff9202b54219b69f54ca55609708.png

发表评论

表情:
评论列表 (有 0 条评论,129人围观)

还没有评论,来说两句吧...

相关阅读

    相关 HTML表格table

    什么是表格?表格是由行和列排列而成的一种结构,按照行和列呈现数据,从而进行页面布局。这种布局方式已经过时。建议使用div+css实现页面布局。   如何创建HTML表格:H

    相关 HTML <table>表格概述

    使用`<table>`可以创建一个表格, 之前,表格会用来进行页面布局,但是由于嵌套过于复杂,不利于灵活布局和后期改版,当前已经鲜有使用,不要认为它已经被淘汰,而是被用来...