2016-11-17 53 views

回答

4

你應該學會使用Chrome瀏覽器檢查元素。

enter image description here

如果你這樣做,你可以使用指針來選擇元素,並追查填充。

enter image description here

你可以看到,如果你讓填充和利潤率0將dissappear的前兩個值。

enter image description here

2

如果忽略這些規則設置填充保證金,你應該有它:

@media only screen and (max-width: 500px) and (min-width: 450px) 
#mj-header { 
    /* padding: 55px 0 0px; */ 
} 

@media screen and (max-width: 700px) 
#mj-header { 
    /* padding: 55px 0 0; */ 
    /* margin: 55px 0 0; */ 
} 

附:發佈活網站鏈接並不好。如果可以的話,最好儘量只發佈一個問題的樣本。

1

這是因爲當屏幕縮小時,頂部會有巨大的填充。它在CSS內部。

刪除:

@media only screen and (max-width: 1000px) and (min-width: 720px) { 
    #mj-header { 
    padding: 25px 0 5px; 
    } 
} 

或使其:

@media only screen and (max-width: 1000px) and (min-width: 720px) { 
    #mj-header { 
    padding: 5px 0; 
    } 
} 

從你的CSS。

希望這會有所幫助!

0

速戰速決將是把媒體查詢(在這種情況下,標準的iPhone)

@media only screen 
    and (min-device-width: 320px) 
    and (max-device-width: 480px) 
    and (-webkit-min-device-pixel-ratio: 2) 
    and (orientation: portrait) { 
} 

,並相應地調整填充和利潤(在55像素加起來110白色差距往上頂。

希望這會有所幫助!