<input type=“submit”> padding bug on Safari mobile?

前端 未结 5 2082
眼角桃花
眼角桃花 2021-02-13 23:47

(This is similar to the (also unanswered) question #3430506, but applies to input tags instead of HTML5 elements.)

On buttons, th

5条回答
  •  误落风尘
    2021-02-14 00:13

    I had a similar issue and I noticed that my issue was resolved when I set the background to a gradient instead of just plain background-color.

    This somehow just ignored the padding values

    #submit{
        background:#a0b9dc;
        padding:9px 35px;
     }
    

    The code below resolved the padding issue for me on submit buttons.

    #submit{
        background:#a0b9dc;
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #A0B9DC));
        background: -o-linear-gradient(bottom, #A0B9DC 0%);
        background: -moz-linear-gradient(bottom, #A0B9DC 0%);
        background: -webkit-linear-gradient(bottom, #A0B9DC 0%);
        background: -ms-linear-gradient(bottom, #A0B9DC 0%);
        background: linear-gradient(to bottom, #A0B9DC 0%);
        padding:9px 35px;
    }
    

提交回复
热议问题