- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>通高科技</title>
- <style>
- table{
- width: 500px;
- border: 1px solid red;
- }
- th,tr,td{
- border: 1px dashed red;
- }
- td{
- text-align :center;
- }
- </style>
- </head>
- <body>
- <table >
- <tr>
- <td>1</td>
- <td>2</td>
- <td>3</td>
- </tr>
- <tr>
- <td colspan="3">table邊框樣式實線虛線</td>
- </tr>
- </table>
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>通高科技</title>
- <style>
- table{
- width: 500px;
- border-color: aqua;
- }
- td{
- text-align :center;
- }
- </style>
- </head>
- <body>
- <table border="1" >
- <tr>
- <td>1</td>
- <td>2</td>
- <td>3</td>
- </tr>
- <tr>
- <td colspan="3">table邊框顏色</td>
- </tr>
- </table>
- </body>
- </html>
1、首先新建一個html,點擊中間,先填入表格內(nèi)容;
2、style樣式控制,設(shè)置高度顏色等
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>通高科技</title>
- <style>
- table{
- width: 500px;
- border-collapse : collapse;
- }
- td{
- text-align :center;
- }
- </style>
- </head>
- <body>
- <table border="1">
- <tr>
- <td>1</td>
- <td>2</td>
- <td>3</td>
- </tr>
- <tr>
- <td colspan="3">456</td>
- </tr>
- </table>
- </body>
- </html>