Overflow-x:hidden; on mobile device not working

后端 未结 6 1898
广开言路
广开言路 2021-01-02 00:31

I hope you guys can help me cause I cant seem to wrap my head arroud this. I build a one-page site which works fine, except for one thing, which is the overflow-x:hidden on

6条回答
  •  孤城傲影
    2021-01-02 01:18

    As pointed out by Dorvalla, body and html tags are ignored by smartphones browsers, although not by "big screen" browsers, I solved the issue by using the first child of the page structure, so no need of an aditional wrapper.

    e.g. for my WordPress case:

        .site {
            overflow-x: hidden;
            /* Unnecessary IMHO, uncomment next line to force hidden behavior */
            /* overflow-x: hidden !important; */
            /* Additional tunning proposed by the community */
            position: relative;
            width: 100%;
        }
    

提交回复
热议问题