[英]How can I create continuous border line for table?
我正在使用html創建表。 我想為不同的表行創建連續的行,而不必為第一行連接行。 使用table的border-collapse屬性可以幫助連接線,但這也可以連接標題行,在標題單元格之間不留任何空間。 如何在不影響最高圓的情況下用藍色圓圈連接線? 這是小提琴 ,html和css代碼。
<table id="table">
<tr>
<td>ENTERPRISE</td>
<td>PRIMARY VARIABLES</td>
<td>SECONDARY VARIABLES</td>
</tr>
<tr>
<td>Labor Market</td>
<td>N/A</td>
<td>Both events had an excellent attendance from C-level executives, with the CFO Forum having its highest attendance rate so far.</td>
</tr>
<tr>
<td>Economic Diversification</td>
<td>recently hosted two of its flagship events in Hong Kong, the INED Forum and CBA Forum.</td>
<td>For further information on previous INED and CFO events, please click here to access the Pursuits Resource Centre.</td>
</tr>
<tr>
<td>Innovation and R&D</td>
<td>He has vast experience working with insurance audit clients, and will be working on two global accounts.</td>
<td>Sandy specialises in tax, and brings vast knowledge with her in terms of asset management and private equity</td>
</tr>
</table>
#table tr:first-of-type td{
font-size: 18pt;
color: rgb(0,37,122);
background-color: rgb(152,198,234);
text-align: center;
font-family: "Arial Bold";
height: 18px;
}
#table tr:not(:first-of-type){
font-family: "Arial Regular";
font-size: 14pt;
color: rgb(51,51,51);
}
td{
padding-top: 18px;/*2.3653%*/
padding-bottom: 18px;
padding-right: 57px; /*3.5625%*/
border-style:none none solid none;
}
tr td:last-of-type{
padding-right: 0;
}
#table {
border-spacing:0
}
是你的答案
#table{
border-spacing: 0;
border-collapse: separate;
}
border-spacing
css屬性將為您提供幫助。
border-spacing屬性設置相鄰單元格的邊界之間的距離
工作小提琴已附上。
加厚您的td邊框,直到模糊為止! (為我工作)
table td{
border: 2px solid black;
}
然后根據需要使透明線變細(1px)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.