水平滚动-仅限Mac Safari [英] Horizontal Scroll - Mac Safari only

查看:36
本文介绍了水平滚动-仅限Mac Safari的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行水平滚动,但是仅在Mac Safari上.我无法在其他地方复制该问题,并且很难进行故障排除(为此,我通常在Firefox上使用Firebug).

I'm getting a horizontal scroll, but only on Mac Safari. I can't replicate the issue elsewhere, and it's hard to troubleshoot (I usually use Firebug on Firefox for this).

URL是

http://getinjuryanswers.com 

我很乐意粘贴代码,但我什至不确定要定位的代码.

I would be happy to paste the code, but I'm not even sure what code to target.

任何反馈将不胜感激.

谢谢.

推荐答案

在最外面的包装器中添加 overflow:隐藏以解决滚动条问题:

Add overflow: hidden to outermost wrapper to fix scroll bar issue:

.site-container {
    overflow: hidden;
}

为避免出现此滚动条问题,我始终使用以下结构,它永远不会打扰我..

To avoid this scroll bar issue I always use following structure and it never disturbs me..

HTML:

<html>
    <head></head>
    <body>
        <div class="wrapper">
             <header class="header></header>
             <main class="main></main>
             <footer class="footer"></footer>
        </div>
    </body>
</html>

CSS:

body {
    margin: 0;
    // and other necessary properties for your page.
}
.wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

这篇关于水平滚动-仅限Mac Safari的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆