Extra padding on Chrome/Safari/Webkit — any ideas?

前端 未结 9 2221
广开言路
广开言路 2021-02-07 05:35

My page has this extra padding on the top of page that I\'m unable to remove. Tried everything under the sun and hope someone can show me the way.

Any ideas?

9条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 06:25

    Use this css code:

    /*Reset Safari User Agent Styles*/
    * {-webkit-padding-start: 0px;}
    

    The issue you comment is because the user agent style, I learn about it inspecting the body tag with the browser tool. You should track down the element styles on a navigator using the tools it provides (now all the importants include a DOM inspector) so you can demystify the non-standard behavior.

    I know you dont ask for it but talking about WebKit stuffs, i paste a code for getting rounded borders on every browser but IE.

    .rounded
    {
    -moz-border-radius:5px; /*works on Firefox */
    -webkit-border-radius:5px; /*works on Safari and Google Chrome*/
    border-bottom-radius: 5px; /*works on Opera*/
    }
    

提交回复
热议问题