我尝试了 2 天如何在我的元素中实现侧边栏,例如 Feedly.com 侧边栏
我尝试过的所有脚本/片段/代码破坏了我的设计并移动了所有 div 等。我认为最好的选择是在我的所有网站上创建一个 div。我该怎么做??
我现在拥有的:
我想做什么:
感谢您的宝贵时间; 最好的问候,
最佳答案
要创建侧边栏,您只需要:
.sidebar {
/* Dimensions */
width: 3.8em; /* adjust it to make it wider or narrower */
height: 100%; /* to be the entire height of the window */
/* Positioning */
position: fixed; /* to stay fixed on the screen */
top: 0;
left: 0; /* Or right: 0 to put right */
/* Visibility */
display: inline-block;
}
关于javascript - 整个网站上的可扩展侧边栏(div)(在后台),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37644892/