2015-09-05 57 views
-3

剛剛創建了我的企業網站,並進行了調試測試。像往常一樣,我假設。我的導航,正文和頁腳根據使用的設備進行調整。多個設備的CSS屏幕分辨率

我希望有一個簡單的修復方法來創建每個設備的屏幕調整,但我不知道如何去做。我查閱的信息都顯示不同的東西。

有人可以幫助我如何實現代碼來調整每屏幕分辨率? (不同的電腦屏幕,移動設備 - iPhone和三星,平板電腦等)

網址是:http://www.se7enservice.com

+0

有太多的設備和屏幕尺寸只是挑選一組數字和**希望**設計適合。更改屏幕大小,直到設計中斷並使用* that *作爲選定的媒體查詢中斷點。它可能是945px,可能是865px,但它是你的設計......而不是設備。 –

+0

好的,這是我不知道的。謝謝 – blackRob4953

+0

不要引用其他網站,尤其是不是指他們是商業網站。看起來好像你想要垃圾郵件。 – peterh

回答

1
<style type="text/css"> 
    /* default styles here for older browsers. 
     I tend to go for a 600px - 960px width max but using percentages 
    */ 
    @media only screen and (min-width:960px){ 
     /* styles for browsers larger than 960px; */ 
    } 
    @media only screen and (min-width:1440px){ 
     /* styles for browsers larger than 1440px; */ 
    } 
    @media only screen and (min-width:2000px){ 
     /* for sumo sized (mac) screens */ 
    } 
    @media only screen and (max-device-width:480px){ 
     /* styles for mobile browsers smaller than 480px; (iPhone) */ 
    } 
    @media only screen and (device-width:768px){ 
     /* default iPad screens */ 
    } 
    /* different techniques for iPad screening */ 
    @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) { 
     /* For portrait layouts only */ 
    } 

    @media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) { 
     /* For landscape layouts only */ 
    } 
</style>