2014-01-24 58 views

回答

0

側邊欄使用position:fixed;來保持它的位置。響應方(重新調整瀏覽器的大小)很可能是使用媒體查詢。例如:

@media only screen and (max-width: 999px){ 
    //if screen is less than or equal to 999px (just a random number) execute this code 
} 

@media only screen and (min-width: 1000px){ 
    //if screen is greater than or equal to 1000px (just a random number) execute this code 
} 

UPDATE

RESIZE THE BROWSER

+0

我明白右側 - 我不明白的是,他如何得到側邊欄消失。 –

+0

容易,使用媒體查詢。假設側邊欄在屏幕較小的情況下位於某個容器中,例如1000px,只需將該容器設置爲「display:none」即可。我會用一個例子更新我的答案。 – jmore009

+0

@John添加了小提琴 – jmore009

相關問題