2015-06-16 39 views
0

我正在用border=1繪製一張桌子,但它看起來相當突出,因爲我在其中放置了一張圖像,所以我想使它更薄以獲得更好的外觀和感覺。如何減少表格邊框的厚度?

<table border=1 cellpadding=50 cellspacing=0><tr><td></td></tr></table> 

如何減少邊界厚度?

回答

1

你可以樣式像這樣:

td, th { 
    border: .1px solid black; 
} 

JSFIDDLE DEMO

0

此示例代碼可以幫助你,

CSS + HTML

table{ 
    border:5px solid blue; 
} 
caption{ 
    color:wheat; 
} 
th{ 
border:2px solid yellow; 
background-color:grey; 
} 
td{ 
border:3px solid red; 
background-color:green; 
} 


    <table border=1 cellpadding=50 cellspacing=0> 
     <caption>TABLE</caption> 
     <thead> 
      <tr><th>H1</th><th>H2</th></tr> 
     </thead> 
     <tbody> 
      <tr><td>1</td> <td>1</td></tr>  
      <tr><td>1</td> <td>1</td></tr> 
     </tbody> 

     <tfoot> 
      <tr><td colspan="2" >FOOTER</td></tr>  
     </tfoot> 
    </table>