【发布时间】:2017-05-16 15:21:14
【问题描述】:
基本上,我想将我的tds 水平间隔开。在 Firefox 中,通过设置边距可以正常工作,但边距在 chrome 中不起作用。所以我尝试了以下并将其应用于表格
border-spacing: 40px;
border-collapse: separate;
此外,该解决方案适用于 chrome,但不适用于 Firefox;即使指南建议我需要 border-collapse: 单独让它在 Firefox 中工作。
没有任何进一步的细节,这里是表格样式的代码(在 Firefox 中工作的那个):
#tstyle3 {
margin: 10px 0 0 0px;
width: 750px;
border-collapse: separate;
}
#tstyle3 tr {
height: 270px;
border-bottom: none;
border-collapse: separate;
width: 950px;
display: inline-block;
}
#tstyle3 td {
border-top: none;
display: inline-block;
position: relative;
border-collapse: separate;
margin: 0 30px 0 0;
height: 220px;
width: 220px;
background-color: white;
float: left;
box-shadow: 0px 3px 5px #b5b6b6;
}
并且在 jsfiddle 中重新创建了这种情况(显示了它在 Firefox 中的显示方式)
【问题讨论】:
标签: html css google-chrome firefox css-tables