Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何使shinyAce应用程序容器背景透明_Css_R_Shiny_R Markdown - Fatal编程技术网

Css 如何使shinyAce应用程序容器背景透明

Css 如何使shinyAce应用程序容器背景透明,css,r,shiny,r-markdown,Css,R,Shiny,R Markdown,我使用rmarkdown创建了一个闪亮的演示文稿,其中一张幻灯片包含shinyAce编辑器(代码如下)。整个应用程序似乎都在一个白色背景的容器中。我想使用css使这个容器的背景透明,但到目前为止,我还无法找到正确的对象名来应用更改 我尝试了一个简单的par(bg=NA),并在rmarkdown、shiny和shinyAce包中的默认css文件中使用了工具,但找不到进行更改的适当位置 最后,我在mainPanel中加入了代码来更改背景的颜色。然而,这似乎只是白色容器上的一个覆盖,因为当我设置bod

我使用rmarkdown创建了一个闪亮的演示文稿,其中一张幻灯片包含shinyAce编辑器(代码如下)。整个应用程序似乎都在一个白色背景的容器中。我想使用css使这个容器的背景透明,但到目前为止,我还无法找到正确的对象名来应用更改

我尝试了一个简单的
par(bg=NA)
,并在
rmarkdown
shiny
shinyAce
包中的默认css文件中使用了工具,但找不到进行更改的适当位置

最后,我在
mainPanel
中加入了代码来更改背景的颜色。然而,这似乎只是白色容器上的一个覆盖,因为当我设置
body{background color:transparent
}时,背景仍然是白色的

和往常一样,我们非常感谢您的帮助

---
title                  : "White Backgrounds are Ugly"
subtitle               : "Help me make it go away"
author                 : "Me"
date                   : "Now"
output: 
  ioslides_presentation:
    widescreen         : true
runtime: shiny
---   

## Basic R Plot with shinyAce

```{r, echo=FALSE}
library(shinyAce)
shinyApp(
  shinyUI(
    fluidPage(
  sidebarLayout( 
    sidebarPanel(
        aceEditor("code", mode="r", 
                  value="plot(1:5, 1:5,\nxlab = 'This is side 1',\nylab = 'This is side 2',\nmain = 'This is side 3',\nsub = 'Subtitle or Caption',\naxes = TRUE,\ntype = 'p',\nlas = 0)"),
          actionButton("eval", "Evaluate")),

      mainPanel(list(tags$head(tags$style("body {background-color: rgba(255,130,255,1); }"))), plotOutput("output"))))),

shinyServer(function(input, output, session) {
output$output <- renderPlot({
  par(bg = NA)
  input$eval
  return(isolate(eval(parse(text=input$code))))
})  
})
)
```
---
标题:“白色背景很难看”
字幕:“帮我让它消失”
作者:“我”
日期:“现在”
输出:
ioslides_演示文稿:
宽屏:真的吗
运行时间:闪亮
---   
##带shinyAce的基本R图
```{r,echo=FALSE}
图书馆(新亚斯)
shinyApp(
新余(
流动摄影(
侧边栏布局(
侧栏面板(
aceEditor(“代码”,mode=“r”,
value=“绘图(1:5,1:5,\nxlab='这是第1面',\nylab='这是第2面',\nmain='这是第3面',\nSB='副标题或标题',\naxes=TRUE,\ntype='p',\nlas=0)”,
操作按钮(“评估”、“评估”),
主面板(列表(标记$head(标记$style(“主体{背景色:rgba(255130255,1);}”))))、绘图输出(“输出”;))),
shinyServer(功能(输入、输出、会话){
输出$输出