我想要左側邊欄和邊距線保持原位而有人向下滾動site。但側邊欄不斷改變它的位置here與屏幕大小調整。任何修復?Css側欄靜態
@media only screen and (max-width: 550px) {
.side-bar-icon {
display: none;
}
.side-line {
position: relative;
max-width: 36rem;
border-right: none; !important;
border-bottom: thick solid #ef4a60;
padding-bottom: 30px;
margin-bottom: 50px;
}
參考代碼here
這裏有一個類似的問題:http://stackoverflow.com/questions/15590803/how-to-implement-fixed-sidebar-correctly –
問題尋求幫助的代碼必須包括必要的最短的代碼重現它**在問題本身**最好在[** Stack Snippet **](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets /)。雖然您提供了[**鏈接到示例或網站**](http://meta.stackoverflow.com/questions/254428/something-in-my-web-site-or-project-doesnt-work-如果鏈接變得無效,那麼你的問題對於其他具有相同問題的未來SO用戶將沒有任何價值。 –
@Paulie_D感謝您的建議。我已經添加了代碼。 –