【问题标题】:horizontal scroll appears only in chrome水平滚动仅出现在 chrome 中
【发布时间】:2013-07-05 23:23:51
【问题描述】:

我在 Chrome 中出现水平滚动条时遇到问题。页面宽度为 960 像素,滚动条不应处于活动状态。我找不到导致此问题的元素。

请帮忙,网址是http://jciventure.it360.pl/

【问题讨论】:

    标签: google-chrome scrollbar horizontal-scrolling


    【解决方案1】:

    问题在于 h1.assistive-text.section-heading

    改变

    /* Text meant only for screen readers */
    .screen-reader-text,
    .assistive-text {
        position: absolute !important;
        clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
        clip: rect(1px, 1px, 1px, 1px);
    }
    

    /* Text meant only for screen readers */
    .screen-reader-text,
    .assistive-text {
        width:auto;
        position: absolute !important;
        clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
        clip: rect(1px, 1px, 1px, 1px);
    }
    

    【讨论】:

      【解决方案2】:

      在页面上的主要 HTML 标记中包含一个类,其中包含以下内容:

      overflow:hidden;
      margin-left:auto;
      margin-right:auto;
      

      现在可以在 Chrome 中使用了。

      【讨论】:

        猜你喜欢
        • 2020-06-30
        • 1970-01-01
        • 2014-10-01
        • 1970-01-01
        • 1970-01-01
        • 2011-02-04
        • 1970-01-01
        • 2012-03-14
        • 1970-01-01
        相关资源
        最近更新 更多