【发布时间】:2021-05-08 02:05:57
【问题描述】:
运行这个小程序后看到红色文字。我想右对齐该部分。
我认为这很简单。除了正确的答案,我什么都试过了。
library(shiny)
library(shinythemes)
ui=fluidPage(
navbarPage("hi",theme=shinytheme("cerulean"),
tabPanel("example", fluid = TRUE, icon = icon("globe-americas"),
sidebarLayout(
sidebarPanel( p(style="text-align: center; ","sidepanel text")
),
mainPanel(
fluidRow(column(width=12,
p("first box",style="font-size:125%;padding:12px;color:black; background-color:#fafafc"),
div(strong("All I want is"),
br(),
p("for the text in red",span("to be on the right side of this container",style="align-text: right; color: red"),
br(),
style="font-size:125%;padding:12px;color:black; background-color:#fafafc"),
hr(),
),
column(width=12,p("third box",style="font-size:125%;padding:12px;color:black; background-color:#fafafc"))
))
)))))
server=function(input, output,session) {}
shinyApp(ui=ui, server=server)
【问题讨论】:
标签: r shiny text-align right-align