简体   繁体   中英

How to make CSS padding work in Chrome but not in Firefox or Safari?

I've finished my initial code in my localhost and just migrated the files to my linode. Google Chrome doesn't seem to recognize the CSS padding settings I've placed in my main settings. Firefox and Safari does not seem to have a program rendering it.

 main.main { padding-top: 50px; } 
 <main class="main"> <h1>Sometext</h1> </main> 

试试这个

@media screen and (-webkit-min-device-pixel-ratio:0) {}

Please try this:

@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
    main.main {
  padding-top: 50px;
}
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM