【问题标题】:Changing the orientation of navigation bar flexdashboard更改导航栏 flexdashboard 的方向
【发布时间】:2017-11-29 03:22:15
【问题描述】:

我正在使用 rMarkdown 和 rStudio 的 flexdashboard 包进行项目。它工作得很好。我唯一苦苦挣扎的是改变导航栏的方向。默认情况下,它显示在 html 文件的顶部,我希望它位于左侧,每个按钮水平显示。有没有办法做到这一点?感谢您的意见!

【问题讨论】:

    标签: r r-markdown navigationbar flexdashboard


    【解决方案1】:

    我尝试了一些似乎可行的方法(不过可能会有所改进,我不是 CSS 专家...)

    ---
    title: "test"
    output: flexdashboard::flex_dashboard
    ---
                
    <style>
    .navbar {
      margin: 0;
      padding: 0;
      height: 100%;
      display: block;
      position: fixed;
      width: 200px; /* Modify the width of the sidebar */
    }
    body {
              margin-left: 200px; /* Add a left margin to avoid content     overlay */
    padding-top:0px
    }
    </style>
    

    【讨论】:

      【解决方案2】:

      您应该能够做到这一点,但不确定如何做到这一点。正如您可以hide the barchange it's color 一样,您也应该能够将其移到左侧编辑CSS/HTML 代码。尝试编辑 和导航栏的浮动属性。

      还有一种可能,如果对你没问题,你也可以试试ShinyDashboard,主菜单在左边。

      【讨论】:

        猜你喜欢
        • 2022-01-12
        • 1970-01-01
        • 2012-12-10
        • 1970-01-01
        • 2020-12-02
        • 2020-05-28
        • 1970-01-01
        • 2017-12-22
        • 2017-11-02
        相关资源
        最近更新 更多