iPhone <button> padding unchangeable?

后端 未结 6 1423
忘了有多久
忘了有多久 2020-12-15 00:30

A HTML5

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 00:46

    I've overcome this problem by wrapping

    or by using jQuery and adding the following to a script...

    $('button').wrapInner('
    ')

    ...and including the following styles to the page

    button { padding: 0; }
    button > div { margin: 0 -1em; padding: 0.4em 0.8em; }
    

    Note that you can change the inner div's padding to suit your needs. Also note that this will only work with

提交回复
热议问题