当前位置:   article > 正文

div+css普通表格样式

div 表格样式
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>无标题文档</title>
  6. <style type="text/css">
  7. body,td,th {font-size: 12px; font-family:"新宋体";}
  8. img{ border:0;}
  9. ul ,li{ margin:0; padding:0; list-style:none;}
  10. ul.table1{ height:30px; border-bottom:1px solid #fff; clear:both;}
  11. ul.table1 li{ background:#999;float:left; border-right:1px #fff solid; line-height:30px; text-align:center; font-weight:bold;}
  12. ul.table2{ height:30px; border-bottom:1px solid #fff; clear:both;}
  13. ul.table2 li{ background:#ccc;float:left; border-right:1px #fff solid; line-height:30px; text-align:center;}
  14. .name1{ width:50px;}
  15. .name2{ width:150px;}
  16. .name3{ width:350px;}
  17. .name4{ width:100px; text-align:left; }
  18. ul.table1 li.name4{ width:100px; text-align:left; }
  19. ul.table1 li .taxis{ float:right; margin-right:5px; width:12px; text-align:right; margin-top:8px; _margin-top:4px; vertical-align:middle;}
  20. ul.table1 li .taxis_title{ float:left; margin-left:5px; text-align:left; }
  21. .liter{ margin:0;margin-bottom:4px;_margin-bottom:-2px;}
  22. .drop{ margin:0;}
  23. .table_left{ width:30%; overflow:hidden; float:left;}
  24. .table_right{ width:70%; overflow:hidden; float:right;}
  25. .table_left div{ background:#ececd8;margin-right:1px;margin-bottom:1px; text-align:right; padding:3px 5px;}
  26. .table_right div{ background:#eee; margin-bottom:1px; padding:3px 5px;}
  27. .table_height_30{ height:30px; line-height:30px;_line-height:25px; }
  28. .table_height_100{ height:100px; display:block; }
  29. .table_height_100_left{ height:100px; line-height:100px; }
  30. .table_height_301 {height:30px; line-height:30px;_line-height:25px; }
  31. </style>
  32. </head>
  33. <body>
  34. <h3>简单的表格列表</h3>
  35. <ul class="table1">
  36. <li class="name1">序号</li>
  37. <li class="name2">名称</li>
  38. <li class="name3">内容</li>
  39. </ul>
  40. <ul class="table2">
  41. <li class="name1">1</li>
  42. <li class="name2">测试文件</li>
  43. <li class="name3">测试文件内容。。。。。</li>
  44. </ul>
  45. <ul class="table2">
  46. <li class="name1">2</li>
  47. <li class="name2">测试文件</li>
  48. <li class="name3">测试文件内容。。。。。</li>
  49. </ul>
  50. <ul class="table2">
  51. <li class="name1">3</li>
  52. <li class="name2">测试文件</li>
  53. <li class="name3">测试文件内容。。。。。</li>
  54. </ul>
  55. <ul class="table2">
  56. <li class="name1">4</li>
  57. <li class="name2">测试文件</li>
  58. <li class="name3">测试文件内容。。。。。</li>
  59. </ul>
  60. <ul class="table2">
  61. <li class="name1">5</li>
  62. <li class="name2">测试文件</li>
  63. <li class="name3">测试文件内容。。。。。</li>
  64. </ul>
  65. <h3>带有排序功能的表格列表</h3>
  66. <ul class="table1">
  67. <li class="name1">序号</li>
  68. <li class="name2">名称</li>
  69. <li class="name3">内容</li>
  70. <li class="name4">
  71. <span class="taxis_title">排序</span>
  72. <span class="taxis">
  73. <div class="liter"><a href="#"><img src="images/desc.gif" width="10" alt="升序" /></a></div>
  74. <div class="drop"><a href="#"><img src="images/asc.gif" width="10" alt="降序"/></a> </div>
  75. </span>
  76. </li>
  77. </ul>
  78. <ul class="table2">
  79. <li class="name1">1</li>
  80. <li class="name2">测试文件</li>
  81. <li class="name3">测试文件内容。。。。。</li>
  82. <li class="name4">测试文件内容</li>
  83. </ul>
  84. <ul class="table2">
  85. <li class="name1">2</li>
  86. <li class="name2">测试文件</li>
  87. <li class="name3">测试文件内容。。。。。</li>
  88. <li class="name4">测试文件内容</li>
  89. </ul>
  90. <div style="clear:both;"></div>
  91. <h3>百分比复杂的表格列表</h3>
  92. <div class="table_left">
  93. <div><span class="table_height_30">带宽:</span></div>
  94. <div><span class="table_height_100_left">扩展 IP地址:</span></div>
  95. </div>
  96. <div class="table_right">
  97. <div>
  98. <span class="table_height_30">下行:<input /> <select ><option>Mbit</option></select>
  99. <label><input name="checkbox" type="checkbox" />限制总下行 </label>
  100. <input name="button" type="button" class="sys_botton input2_hand" value="确定" />
  101. </span>半行高错误,则需把所在的div高度去掉即可。</div>
  102. <div><span class="table_height_100">
  103. <div style="width:200px;padding:0; float:left;">
  104. <textarea name="textarea" id="textarea" style="width:100%; height:85px;"></textarea>
  105. </div>
  106. <div style="float:left; width:250px;padding:0; margin-left:10px;">
  107. <div style="float:left; width:80px; overflow:hidden;padding:0;">
  108. <div class="table_height_30" style="text-align:right;">用户名:</div>
  109. <div class="table_height_30" style="text-align:right;">密码:</div>
  110. </div>
  111. <div style="float:right; width:170px;padding:0;">
  112. <div class="table_height_30" style="padding:0; margin-top:5px;"><input style="vertical-align:middle;" /></div>
  113. <div class="table_height_30" style="padding:0; margin-top:5px;"><input style="vertical-align:middle;" /></div>
  114. </div></div>
  115. </span></div>
  116. </div>
  117. <div style="clear:both"></div>
  118. </body>
  119. </html>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/代码探险家/article/detail/767429
推荐阅读
相关标签
  

闽ICP备14008679号