小编Man*_*s C的帖子

闪亮:标签位置,textInput

让我们假设我有一个非常简单的应用程序,只有8个输入分组在2个面板中(4个输入| 4个输入 - 见下图),并根据这些,我绘制一个小图(容易peasy).

我要制作的小组

我面临的问题是我想要仅为第一个面板和textInput框的左侧设置标签.

例如(请原谅我的草率图像编辑!)

在此输入图像描述

有什么建议吗?

我的MWE图1输出:

library(shiny)
ui<-shinyUI(fluidPage(
  wellPanel(
    tags$style(type="text/css", '#leftPanel { max-width:300px; float:left;}'),
    id = "leftPanel",
    textInput("Population1000", 'Population 1000',"15"),
    textInput("Area1000",'Area  1000', "20"),
    textInput("GNI1000", 'GNI 1000', "2314"),
    textInput("GDP1000", "GDP 1000", "1000")
  ),
  wellPanel(
    tags$style(type="text/css", '#RightPanel { max-width:300px; float:left;}'),
    id = "RightPanel",
    textInput("Population2000", 'Population 2000',"15"),
    textInput("Area2000",'Area 2000', "20"),
    textInput("GNI2000", 'GNI 2000', "2314"),
    textInput("GDP2000", "GDP 2000", "1000")
  )
)
)
server<-shinyServer(function(input, output) {NULL})
shinyApp(ui,server)
Run Code Online (Sandbox Code Playgroud)

css styles r shiny

2
推荐指数
1
解决办法
2373
查看次数

标签 统计

css ×1

r ×1

shiny ×1

styles ×1