css - 带有自动调整大小的尾随下划线的表头 CSS
问题描述
仅使用 HTML 和 CSS,我希望有一个如下表:
Header1 Header2
-------------- --------------------
L1Col1 content L1Col2 wider content
L2Col1 datum L2Col2 datum2
Where the underline automatically sizes to the
table column width.
Help!
解决方案
阿祖,谢谢你的回答。“边框间距”的用法对我来说完全有启发性。我将 CSS 修改为以下内容:
.sample-table {
text-align: left;
border-spacing: 25px 0;
}
.sample-table th {
border-bottom: 2px solid #000;
}
.sample-table td,
.sample-table th {
padding: 3px 0px;
}
这正是我想要的。
推荐阅读
- android - HTTP 请求的默认标头 - Android
- azure - 将 Azure Databricks 笔记本中的 DataFrame 写入 Azure DataLake Gen2 表
- python - 如何在python Ndarray中获取第一个最小的5个值并获取它们在ndarray中的位置
- javascript - 如何根据需要将对象数组转换为对象
- r - 将模型中的插补数据添加到数据集 - hmisc aregImpute
- spring - Spring *Aware 接口与注入所需对象相比有什么好处?
- python - How to packaging and run python script including venvs on another computer
- c++11 - SOME/IP and VSOMEIP - Communication between 2 devices (TCP/UDP) Not working
- sonarqube - 错误:“字符串索引超出范围”显示 SonarQube 中的漏洞
- javascript - How remove img when click button?