gpt4 book ai didi

google-chrome - TD 一个 TH 相对位置,突破溢出 : scroll parent in Chrome

转载 作者:行者123 更新时间:2023-12-02 04:23:50 25 4
gpt4 key购买 nike

我认为这是最近开始的,而且似乎只是 chrome 中的一个问题。表格响应类应该包含表格,以便在溢出时滚动,但在 chrome 中,td/th 元素正在流出容器。

enter image description here

这是 HTML:

<div class="compact card-columns">
<div class="card bg-light mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Light card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
<div class="card bg-light mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<h5 class="card-title">Light card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
<div class="card bg-light mb-3" style="max-width: 18rem;">
<div class="card-header">Header</div>
<div class="card-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

和 CSS:

td, th {
position: relative;
}

我也在这里用笔转载了它:

https://codepen.io/anon/pen/xopXxm

最佳答案

enter image description here我猜是因为你的字体大小越来越溢出。我不知道它是否会让你满意。尝试给 TH,TD 一个字体大小

td, th {
position: relative;
font-size: 6.5px;
}

关于google-chrome - TD 一个 TH 相对位置,突破溢出 : scroll parent in Chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56809201/

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