【发布时间】:2017-03-15 13:16:53
【问题描述】:
我正在尝试在 rmarkdown 中整合一个显示 js 演示文稿,但在覆盖默认 css 主题时遇到了麻烦。我想从我的绘图图像中删除边框。根据文档,这应该可以工作:
但它没有,我猜这是因为这个覆盖不是更具体。但我的问题是我通常的增加特异性的方法也不起作用:
## Slide with Plot
<section class = "no-border">
```{r pressure}
plot(pressure)
```
</section>
这是 YAML 标头:
title: "Title"
author: "..."
date: '`r paste(format(Sys.Date(),"%d")," ", mymonths[sys.man], ", ",
format(Sys.Date(),"%Y"), sep = "")`'
output:
revealjs::revealjs_presentation:
incremental: true
includes:
in_header: slidy_bootstrap_header.html
css: slidyStandard.css
这是 css 覆盖:
section.no-border > img {
background:none;
border:none;
box-shadow:none;
}
有谁知道我做错了什么?
【问题讨论】:
-
你确定 YAML 中的缩进是正确的吗?您是否尝试将
!important添加到您的 CSS 类? -
@MartinSchmelzer 我希望如此,没有错误,但这并不意味着什么,也添加了它。编辑:试过了!重要的是,也没有用
-
为了完整起见,您还可以为
.no-border添加 CSS 样式 :)
标签: css r rstudio r-markdown reveal.js