javascript - 整个网站上的可扩展侧边栏(div)(在后台)

标签 javascript jquery html css

我尝试了 2 天如何在我的元素中实现侧边栏,例如 Feedly.com 侧边栏

我尝试过的所有脚本/片段/代码破坏了我的设计并移动了所有 div 等。我认为最好的选择是在我的所有网站上创建一个 div。我该怎么做??

我现在拥有的:

What I have right now

我想做什么:

What I want

What I want

感谢您的宝贵时间; 最好的问候,

最佳答案

要创建侧边栏,您只需要:

.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/

相关文章:

javascript - 关于如何更新导航代码以隐藏和显示隐藏的 div 的建议

javascript - IntelliJ IDEA 没有运行基本的 JavaScript hello world

javascript - 我如何控制一定比例的具有特定经验的人?

javascript - D3plus 选项对图表没有影响

javascript - HTML5 访问完整列以通过 javascript/jquery 隐藏它

php - 如何保存 jQuery UI portlet 插件的顺序?

javascript - 如何使用 jquery 选择 div 中的元素

jquery - 将 click() 分配给 jquery 中的子控件

javascript - 当脚本没有上传文件时如何阻止提交按钮?

jquery - 如何使 div 的下边距等于其按百分比计算的右边距?