Unwanted padding at bottom of page when input focussed on mobile safari

前端 未结 4 1531
眼角桃花
眼角桃花 2021-02-15 05:18

I\'m working with textareas on mobile safari and when a textarea is focussed the viewport seems to add padding underneath the document. When inspecting and selecting the area, i

4条回答
  •  囚心锁ツ
    2021-02-15 05:23

    At the top of your css styles add this:

    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td,
    article, aside, canvas, details, embed, 
    figure, figcaption, footer, header, hgroup, 
    menu, nav, output, ruby, section, summary,
    time, mark, audio, video {
        margin: 0;
        padding: 0;
    }
    

    You should always do a reset at the top of your styles

提交回复
热议问题