TBODY在FireFox中滚动焦点 HTML
问题 在FireFox中,当您单击一行时,它会将焦点放在tbody上,导致包含的div生成一个水平滚动条,滚动1个像素 问题:TBODY在FireFox中滚动焦点 HTML,html,css,Html,Css,问题 在FireFox中,当您单击一行时,它会将焦点放在tbody上,导致包含的div生成一个水平滚动条,滚动1个像素 问题: 如何防止单击行时出现水平滚动?我可以把溢出-x:隐藏起来;溢出y:自动;而是在包含的div上,但是如果div确实需要水平滚动怎么办?有人知道更好的处理方法吗?如果要防止虚线出现,请尝试以下方法: <html> <body> <div style="width:100%; height: 300px; overflow: auto;"
如何防止单击行时出现水平滚动?我可以把溢出-x:隐藏起来;溢出y:自动;而是在包含的div上,但是如果div确实需要水平滚动怎么办?有人知道更好的处理方法吗?如果要防止虚线出现,请尝试以下方法:
<html>
<body>
<div style="width:100%; height: 300px; overflow: auto;">
<table cellspacing="0" cellpadding="2" style="width:100%;">
<thead>
<tr>
<td>Col1</td>
<td>Col2</td>
<td>Col3</td>
<td>Col4</td>
</tr>
</thead>
<tbody tabindex="0">
<tr>
<td>Col1</td>
<td>Col2</td>
<td>Col3</td>
<td>Col4</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
祝你好运。如果你想阻止虚线出现,请尝试以下方法:
<html>
<body>
<div style="width:100%; height: 300px; overflow: auto;">
<table cellspacing="0" cellpadding="2" style="width:100%;">
<thead>
<tr>
<td>Col1</td>
<td>Col2</td>
<td>Col3</td>
<td>Col4</td>
</tr>
</thead>
<tbody tabindex="0">
<tr>
<td>Col1</td>
<td>Col2</td>
<td>Col3</td>
<td>Col4</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
祝你好运