css實現不顯示table的邊框的方法:可以利用border屬性來實現,如【border:0;】。border屬性用於設定所有的邊框屬性,如border-width,規定邊框的寬度。
border 簡寫屬性在一個宣告設定所有的邊框屬性。
(學習視訊分享:)
可以按順序設定如下屬性:
border-width
border-style
border-color
如果不設定其中的某個值,也不會出問題,比如 border:solid #ff0000; 也是允許的。
屬性值:
border-width 規定邊框的寬度。 border-style 規定邊框的樣式。 border-color 規定邊框的顏色。 inherit 規定應該從父元素繼承 border 屬性的設定。
程式碼範例:
<html> <head> </head> <body> <table> <tr> <th>Firstname</th> <th>Lastname</th> </tr> <tr> <td>Bill</td> <td>Gates</td> </tr> <tr> <td>Steven</td> <td>Jobs</td> </tr> </table> </body> </html>
css
<style type="text/css"> table,th,td { border:0; } </style>
結果:
相關視訊:
以上就是css如何實現不顯示table的邊框的詳細內容,更多請關注TW511.COM其它相關文章!