对于下面的滑动甲板,
---
title : Foo
framework : revealjs # {io2012, html5slides, shower, dzslides, ...}
revealjs : {theme: solarized}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
widgets : [] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
ext_widgets : [libraries/nvd3]
---
## NVD3 Plot Iframe
```{r nvd3plot2, results = 'asis', comment = NA, message = F, echo = F}
require(rCharts)
n1 <- nPlot(mpg ~ wt, data = mtcars, type = 'scatterChart')
n1
```
我想将图表的背景颜色设置为白色。
如果我编织它,然后在生成的figure/nvd3plot2.html
中编辑<style>
块以添加background-color: white;
,我可以做到这一点:
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 400px;
background-color: white;
}
</style>
我该如何从 .rmd 文件?
如我的评论所示,获取白色背景的快速解决方法是将以下行添加到您的Rmd
文件中
<style>iframe{background-color: white}</style>