【问题标题】:Adding line breaks after image in Shiny在 Shiny 中的图像后添加换行符
【发布时间】:2019-05-14 01:32:53
【问题描述】:

我是 HTML 新手,正在尝试在 Shiny 中创建自定义登录页面。

这是我的 UI 的 sn-p,但我无法在图像和文本之间获得额外的换行符。图像和文本渲染良好,但不存在中断。我也试过空白 tags$p() 无济于事。

 navbarPage("",
               tabPanel("Home",
                    tagList(
                        tags$img(src="test_vine.jpg", width = "100%", height = "100%", align = "left"),
                        tags$br(),
                        tags$br(),
                        tags$p("this is a test"))),

【问题讨论】:

    标签: html r shiny


    【解决方案1】:

    fluidRow 将解决这个问题。可能理解fluidRow 的工作方式将解决主要的对齐问题。

    ui <- navbarPage("", tabsetPanel(
               tabPanel("Home",
                        tagList(
                          fluidRow(tags$img(src = "image.png", width = "100%", height = "100%", align = "left")),
                          tags$br(),
                          tags$br(),
                          fluidRow(p("this is a test")))
                        ## Simple way
                       # fluidRow(img(src = "image.png", align = "left", height = 300, width = 500)),
                       #  br(),
                       #  br(),
                       #  fluidRow("this is a test")
                        )))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-13
      • 1970-01-01
      • 2016-07-13
      • 1970-01-01
      相关资源
      最近更新 更多