更改导航栏flexdashboard的方向

问题描述 投票:1回答:2

我正在使用rMarkdown和rStudio的flexdashboard软件包开发一个项目。它很棒。我唯一要努力的是改变导航栏的方向。默认情况下,它出现在html文件的顶部,我希望它在左侧,每个按钮都水平显示。有没有办法做到这一点?感谢您的投入!

r r-markdown navigationbar flexdashboard
2个回答
0
投票

我尝试过似乎有用的东西(可能会改进,但我不是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>

1
投票

你应该能够做到这一点,虽然不知道如何。正如你可以hide the barchange it's color,你也应该能够向左移动编辑CSS / HTML代码。尝试编辑<styl e> </ style>和导航栏的浮动属性。

另一种可能性是,如果对你来说不是问题,你也可以试试主菜单在左边的ShinyDashboard

© www.soinside.com 2019 - 2024. All rights reserved.