gpt4 book ai didi

HTML 合并单元格

转载 作者:行者123 更新时间:2023-11-28 04:40:11 25 4
gpt4 key购买 nike

如您所见,我的表格中的单元格都带有单独的边框。我希望它们是无缝的垂直线和水平线……基本上使细胞壁相互接触。我假设那是填充?

enter image description here

<table align="center" class="data_extract vert_scroll_table" >
<tr>
<c:forEach var="heading" items="${results.headings}">
<th class="data_extract">${heading}</th>
</c:forEach>
</tr>
<c:forEach var="row" items="${results.data}">
<tr>
<c:forEach var="cell" items="${row}" varStatus="rowStatus">
<td class="data_extract">
<c:choose>
<c:when test="${results.types[rowStatus.index].array}">
<c:forEach var="elem" items="${cell}" varStatus="cellStatus">
${elem}<c:if test="${!cellStatus.last}">,&nbsp;</c:if>
</c:forEach>
</c:when>
<c:otherwise>
${cell}
</c:otherwise>
</c:choose>
</td>
</c:forEach>
</tr>
</c:forEach>
</table>

CSS:

table.data_extract {
table-layout: fixed;
border: 2px gray solid;
}

td.data_extract,
th.data_extract,
table.data_extract td,
table.data_extract th {
width: 125px;
height: 75px;
text-align: center;
font-size: 7.5pt;
white-space: normal;
padding-left: 4px;
padding-right: 4px;
}

最佳答案

您可以将 CSS 样式应用于名为 border-collapse: collapse; 的表格

关于HTML 合并单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9381006/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com