作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我安装了以下内容:
我想使用自定义 CSS 创建一个 Shiny 的演示文稿(RStudio 菜单项:文件>新建文件>RMarkdow> Shiny > Shiny 演示文稿),但我不确定如何执行此操作。
我的自定义 CSS(当前仅更改标题 2 的颜色)
h2 {
font-size:1.8em;
color: red;
}
适用于 RMarkdown PResentations with ioslides webpage 上给出的示例摘录:
---
title: "Habits"
author: John Doe
date: March 22, 2005
output:
ioslides_presentation:
css: temp.css
---
## Getting up
- Turn off alarm
- Get out of bed
但是,当我通过在序言中包含 runtime: Shiny
来将其转换为产生 Shiny 输出时,自定义格式不再起作用。
---
title: "Habits"
author: John Doe
date: March 22, 2005
runtime: shiny
output:
ioslides_presentation:
css: temp.css
---
## Getting up
- Turn off alarm
- Get out of bed
## Slide with Interactive Plot
```{r, echo=FALSE}
inputPanel(
selectInput("n_breaks", label = "Number of bins:",
choices = c(10, 20, 35, 50), selected = 20),
sliderInput("bw_adjust", label = "Bandwidth adjustment:",
min = 0.2, max = 2, value = 1, step = 0.2)
)
renderPlot({
hist(faithful$eruptions, probability = TRUE, breaks = as.numeric(input$n_breaks),
xlab = "Duration (minutes)", main = "Geyser eruption duration")
dens <- density(faithful$eruptions, adjust = input$bw_adjust)
lines(dens, col = "blue")
})
```
任何关于如何在 Shiny 的演示文稿中使用自定义 CSS 的提示将不胜感激。
编辑与此问题类似,我无法通过在前面的内容中包含以下内容来包含我自己的 Logo (显然将 png 更改为我自己的系统上的 png):
output:
ioslides_presentation:
logo: logo.png
我的排序列表也不显示数字谢谢。
最佳答案
issue为自定义 CSS 支持而开放的服务已于 2014 年 6 月 24 日关闭。
使用原始问题文本进行测试确实显示了 CSS 中所述的 h2
标题颜色,还测试了添加 logo: Rlogo-1.png
以及 Logo 已使用。
关于r - Shiny 的演示文稿 (ioslides) : Custom CSS and logo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24131827/
我是一名优秀的程序员,十分优秀!