As described in the title,here show the code I'm using.
<style>
.table-wrapper {
overflow: auto;
}
.table {
border-collapse: collapse;
}
</style>
<div class="table-wrapper">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Heading</th>
...
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td>Cell</td>
...
</tr>
...
</tbody>
</table>
</div>
Online demo: https://codepen.io/zhangbao/pen/mYeNzb
To my surprise, unexpected vertical scroll bars appear on the table wrapper element.
I found that because normalize.css sets the line-height: 1.15 for html, and if I set the line-height to a value of 1.2 or greater, the vertical scrollbar disappears.
I want to know what the reason is, thank you !