我正在使用rStudio的flexdashboard包和rMarkdown工作于一个项目中。它运行良好。唯一让我困扰的是如何改变导航栏的方向。默认情况下,它出现在html文件的顶部,而我希望它出现在左侧,每个按钮水平排列。有没有办法实现这个功能?感谢您的建议!
我正在使用rStudio的flexdashboard包和rMarkdown工作于一个项目中。它运行良好。唯一让我困扰的是如何改变导航栏的方向。默认情况下,它出现在html文件的顶部,而我希望它出现在左侧,每个按钮水平排列。有没有办法实现这个功能?感谢您的建议!
我尝试了一些东西,似乎有效(可能还有待改进,因为我不是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>