我已经阅读了关于这个主题的其他答案,但经过几个小时的尝试后-我仍然找不到解决方案。
我有一个网站,我正在照顾,我需要在HTML表头的单元格是无边界的。
网站是http://vcollection.com,而我遇到困难的表格是这个:http://prntscr.com/ltb9o9
你可以在屏幕截图上看到我的风格,但我不能摆脱边框:http://prntscr.com/ltbb19
有趣的是,当将表格宽度缩小1px时,该问题似乎在偶数像素宽度(即962px,960px,958px...)上仍然存在,但在奇数像素宽度(963px,961px,959px等)时不存在。
我试着重现,但似乎做不到:
.linear-background-header {
background-image: linear-gradient(#454545, black);
border: 0;
background-color: transparent;
}
.main-header-section {
display: inline-block;
}
span.header-font {
font-family: Century Gothic;
font-family: sans-serif;
font-size: 13px;
font-weight: 500;
color: #999999;
}
<table border="0" cellspacing="0" cellpadding="0" style="background-color:transparent; margin-top:-25px; width:963px; border-collapse: collapse; border: 0; border-spacing: 0">
<thead>
<tr style="background-image: linear-gradient(#454545, black)">
<th class="linear-background-header">
<div class="main-header-section">
<span class="header-font">New Products</span>
</div>
</th>
<th class="linear-background-header" style="padding: 0; line-height: 0">
<img src="https://vcollection.com/assets/images/separator.png" style="height: 36px; cursor: auto;">
</th>
<th class="linear-background-header">
<div class="main-header-section">
<span class="header-font">Car Mat Configurator</span>
</div>
</th>
<th class="linear-background-header" style="padding: 0; line-height: 0">
<img src="https://vcollection.com/assets/images/separator.png" style="height: 36px; cursor: auto;">
</th>
<th class="linear-background-header">
<div class="main-header-section">
<span class="header-font">Follow Us On Social Media</span>
</div>
</th>
</tr>
</thead>
<br>
<tr height="5px"></tr>
<tr >
<td class="newprodwid" style="width:324px" >dummy
</td>
<td width="15px"></td>
<td class="newprodwid" style="width:340px">dummy
</td>
<td width="15px"></td>
<td style="width:278px" >
dummy
</td></tr>
</table>
发布于 2018-12-11 09:17:56
我知道这就是Chrome issue。所有其他浏览器都可以正常工作,但Chrome有时会根据屏幕分辨率的不同而表现得像这样。
发布于 2018-12-11 08:21:29
这需要一些CSS。如果您使用的是<style>
标记或CSS文件,只需使用
table * {
border: none;
}
https://stackoverflow.com/questions/53715654
复制相似问题