Table表格橫豎線實現Css

來源:互聯網
上載者:User
.tablel
{
 border-collapse:collapse; /* 關鍵屬性:合并表格內外邊框(其實表格邊框有2px,外面1px,裡面還有1px哦) */
 border:solid #999; /* 設定邊框屬性;樣式(solid=實線)、顏色(#999=灰) */
 border-width:1px 0 0 1px; /* 設定邊框狀粗細:上 右 下 左 = 對應:1px 0 0 1px */
}
.tablel th{border:solid #999;border-width:0 1px 1px 0;padding:2px;}
.tablel td {border:solid #999;border-width:0 1px 1px 0;padding:2px;}
附註:頁面引用css檔案,一種直接拖拉,一種在首部添加:
<head runat="server">
    <title>無標題頁</title>
    <link href="default.css" rel="stylesheet" type="text/css" />
</head>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.