Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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
Html 更改输入框的方向_Html_Css_R_Shiny_Shinydashboard - Fatal编程技术网

Html 更改输入框的方向

Html 更改输入框的方向,html,css,r,shiny,shinydashboard,Html,Css,R,Shiny,Shinydashboard,我昨天问了这个问题,但现在我如何改变框的垂直,右侧和左侧 我看到了,因此,必须更改一些CSS元素才能使其正常工作。“旧”框位于classcontainer drag source的div中,“新”框位于classsplit layout的div中。这些不同的div并不是从所有相同的属性开始的,这就是为什么我必须在一个div中进行更多的更改。此外,“新”框的实际框大小由一个未命名、未分类的div控制,该div是shinny split layoutdiv.的后代,硬编码为90%高度。可以将徽章移入

我昨天问了这个问题,但现在我如何改变框的垂直,右侧和左侧


我看到了
,因此,必须更改一些CSS元素才能使其正常工作。“旧”框位于class
container drag source
的div中,“新”框位于class
split layout
的div中。这些不同的div并不是从所有相同的属性开始的,这就是为什么我必须在一个div中进行更多的更改。此外,“新”框的实际框大小由一个未命名、未分类的div控制,该div是
shinny split layout
div.的后代,硬编码为90%高度。可以将徽章移入的“新”框的内部是一个div类
box-dad
,默认填充仅为5px,我必须将其更改为10px,以匹配“旧”框边缘的空白。必须更改的主要内容是将每个div的display属性设置为
inline block
,从而将它们并排设置。其他的东西只是让它们看起来一样大

  library("shiny")
  library("esquisse")
  
  
  ui <- fluidPage(
    tags$h2("Demo dragulaInput"),
    tags$br(),
    tags$style("
      div.container-drag-source{
        display: inline-block;
        width: 250px;
        height: 100%;
        vertical-align: top; 
      }
      div.shiny-split-layout{
        display: inline-block;
        width: 250px; 
        height: 100% !important;
        vertical-align: top; 
        padding: 0px 0 0px 0; 
        margin: 5px 0 0 0; 
        border-width: 1px;
      }
      div.shiny-split-layout div{
        height: 100% !important;
      }
      .box-dad{
      padding: 10px 5px 10px 5px;
      }
    "),
    dragulaInput(
      inputId = "dad",
      sourceLabel = "Old",
      targetsLabels = c("New"),
      choices = levels(iris[,"Species"]),
      width = "600px",
      height = "100px",
      status = "danger"
    ),
    verbatimTextOutput(outputId = "result")
  )
  
  
  server <- function(input, output, session) {
    
    output$result <- renderPrint({
      new_level <- input$dad$target$New
      new_level_1 <- c(new_level,input$dad$source)
    })
    
  }
  
  shinyApp(ui = ui, server = server)
库(“闪亮”)
图书馆(“esquisse”)

你是说徽章在盒子里的什么地方?或者盒子之间的相对位置?期望的输出是什么?很奇怪,我和你的不完全一样,我和旧的一样one@Ben这很奇怪。我在另一台电脑上试了一下,效果很好。如果右键单击Shining应用程序正在运行的其中一个框,然后单击“Inspect element”,您应该会看到样式标记中定义的CSS是否处于活动状态。我也尝试了两台计算机,一台是Mac,另一台是Linux,它仍然不工作,可能是软件包版本。我去了Github中的函数代码,我发现还有两个参数,一个是ncolGrid,一个是ncolSource,我在代码中添加了两个参数,它可以工作。奇怪的是为什么我在函数中看不到这些参数。
if (interactive()) {
  
  library("shiny")
  library("esquisse")
  
  
  ui <- fluidPage(
    tags$h2("Demo dragulaInput"),
    tags$br(),
    dragulaInput(
      inputId = "dad",
      sourceLabel = "Old",
      targetsLabels = c("New"),
      choices = levels(iris[,"Species"]),
      width = "250px",
      height = "100px",
      status = "danger"
    ),
    verbatimTextOutput(outputId = "result")
  )
  
  
  server <- function(input, output, session) {
    
    output$result <- renderPrint({
      new_level <- input$dad$target$New
      new_level_1 <- c(new_level,input$dad$source)
       })
    
  }
  
  shinyApp(ui = ui, server = server)
  
}

  library("shiny")
  library("esquisse")
  
  
  ui <- fluidPage(
    tags$h2("Demo dragulaInput"),
    tags$br(),
    tags$style("
      div.container-drag-source{
        display: inline-block;
        width: 250px;
        height: 100%;
        vertical-align: top; 
      }
      div.shiny-split-layout{
        display: inline-block;
        width: 250px; 
        height: 100% !important;
        vertical-align: top; 
        padding: 0px 0 0px 0; 
        margin: 5px 0 0 0; 
        border-width: 1px;
      }
      div.shiny-split-layout div{
        height: 100% !important;
      }
      .box-dad{
      padding: 10px 5px 10px 5px;
      }
    "),
    dragulaInput(
      inputId = "dad",
      sourceLabel = "Old",
      targetsLabels = c("New"),
      choices = levels(iris[,"Species"]),
      width = "600px",
      height = "100px",
      status = "danger"
    ),
    verbatimTextOutput(outputId = "result")
  )
  
  
  server <- function(input, output, session) {
    
    output$result <- renderPrint({
      new_level <- input$dad$target$New
      new_level_1 <- c(new_level,input$dad$source)
    })
    
  }
  
  shinyApp(ui = ui, server = server)