html - 水平滚动 div 在 Safari 中不起作用

标签 html css safari cross-browser horizontal-scrolling

您好,我不久前在工作期间创建了这个网站,但我刚刚意识到水平滚动跳转在 Safari 中不起作用。

#galleryscroller {
    overflow-x:scroll ;
    overflow-y:hidden;
    overflow:-moz-scrollbars-horizontal !important;
    height:138px; 
    width:360px;
}

<div id="galleryscroller">
<table width="100%"  border="0" cellspacing="0" cellpadding="6">
<tr align="left" valign="middle">
<td><a onclick="return showPic(this)" href="blahblah.jpg"><img src="blahblah.jpg" alt="Events" width="76" height="100" border="0" /></a></td>
<td><a onclick="return showPic(this)" href="blahblah.jpg"><img src="blahblah.jpg" alt="Events" width="100" height="67" border="0" /></a></td>
</tr>
</table>
</div>

网站在这里 - www.tobymurphy.com

任何人都可以帮忙吗?到目前为止,Google 上没有任何答案有效...

最佳答案

当您需要隐藏其中一个滚动条时,带有滚动功能的 WebKit 引擎有一个怪癖。尝试以下操作:

#galleryscroller {
  overflow: none;
  overflow-x: auto;
  display: block;
  height: 138px;
  width: 360px;
}

注意第一次重置使溢​​出变为无。

关于html - 水平滚动 div 在 Safari 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1391262/

相关文章:

javascript - 使用隐藏形式将 JavaScript 分数从游戏发送到 PHP - 我没有得到任何值?

css - 如何在 JSF 中使用来自 webjars.org 的 Font Awesome

ios - 导航栏位置固定不适用于 IOS 设备

safari - Safari 中的 OfflineAudioContext 和 FFT

android - HTML 文件输入接受问题

Javascript 两次转义双引号

javascript - 如果 Google 的主页如此之小,为什么源代码有数百行代码?

html - 如何编码这一部分,知道吗?

html - CSS HTML tfoot、tbody、thead 复杂样式

macos - 您可以在 Mac App Store *之外*分发 Safari App Extension 吗?