Rmarkdown 交互文档 Bootswatch 主题颜色不正确

标签 r shiny r-markdown flexdashboard bootswatch

在使用 Flexdashboard 模板的 R markdown 中,Bootswatch 主题的颜色似乎与 Bootswatch 网站上显示的颜色不匹配

例如,使用 flatly主题

---
title: "Test Dashboard"
output: 
  flexdashboard::flex_dashboard:
    theme: flatly
runtime: shiny
---

我得到的是这样的:
rmarkdown flexdashboard 主题中的扁平主题

enter image description here

Bootswatch 的 flatly 主题是这样的:
来自 Bootswatch 的扁平主题

enter image description here

是否需要指定一些设置才能获得正确的颜色?或者对于 Rmarkdown Bootswatch 主题设置为看起来不同?

最佳答案

添加以下JS块可以解决问题:

```{js}
$('.navbar-inverse').removeClass('navbar-inverse').addClass('navbar-
default');
```

关于Rmarkdown 交互文档 Bootswatch 主题颜色不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46711251/

相关文章:

r - 箱线图与 Fivenum : different outcomes?

r - 如何在运行时 Shiny 的 rmarkdown html_notebook 中使用 renderPlot 布局 2 行,然后是 1 列

r - 动态更新 ggvis Shiny 的用户输入?

r - 警告 : running command 'sh ./configure.win' had status 127

发生时复制每一行data.frame

r - 在 R 中进行子集化时是否需要包含 `which` 或者我可以进行逻辑测试吗?

r - 具有动态文本的 ShinyApp 出现在多个 UI 元素的任何更改上

r - 在Knitr输出中对长字符串进行文本包装(RStudio)

r - 更改多语言 knitr/RMarkdown 文档中的提示

rmarkdown pdf 字体不可用