gpt4 book ai didi

html - 如何完全去除 HTML 表格边框?

转载 作者:太空宇宙 更新时间:2023-11-04 06:41:32 25 4
gpt4 key购买 nike

我已经阅读了有关此主题的其他答案,但经过几个小时的尝试 - 我仍然找不到解决方案。

我有一个我正在管理的网站,我需要 HTML 表格标题中的单元格是无边框的。

网站是http://vcollection.com我遇到困难的表是这个:http://prntscr.com/ltb9o9

您可以在屏幕截图上看到我的样式,但是我仍然无法摆脱边框:http://prntscr.com/ltbb19

有趣的是,当将表格宽度缩小 1px 时,问题似乎仍然存在于偶数像素宽度(即 962px、960px、958px...),但不存在于奇数像素宽度(963px、 961 像素、959 像素等)

我试图重现它,但似乎无法:

.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>

最佳答案

我发现这是 Chrome issue .所有其他浏览器都可以正常工作,但 Chrome 有时会出现这种情况,具体取决于屏幕分辨率。

关于html - 如何完全去除 HTML 表格边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53715654/

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