html里添加虚线


<hr style="border:1px dashed #000; height:1px">


<hr style="border:1px dotted #036" />


<hr style="border : 1px dashed blue;" />


<hr style="border: 1px solid #ff0000"/>


<hr style="border:1px dashed #0000fff"/>


<hr style="border:3px dotted #000 "/>


<hr style="border:2px double #e8e8e8"/>

html设置虚线边框的方法

  1. <!DOCTYPE html> <html>  
  2. <head> <meta charset="utf-8" />  
  3. <title>html边框虚线演示 www.pcss5.com</title> <style>  
  4. .bor{border:1px dashed #F00;width:300px;height:60px;margin-top:10px} span{display:block}/*css注释说明:让span形成块*/  
  5. </style> </head>  
  6. <body> <p class="bor">p盒子</p>  
  7. <span class="bor">span盒子</span> <ul class="bor">  
  8. <li>ul li列表</li> <li>ul li列表</li>  
  9. </ul> <table class="bor">  
  10. <tr> <td>表格</td>  
  11. <td>表格2</td> </tr>  
  12. <tr> <td>数据</td>  
  13. <td>数据2</td> </tr>  
  14. </table> </body>  
  15. </html>  

效果:


最后修改:2019 年 06 月 07 日
收藏不易,如果感觉对你有用,请随意打赏支持下