【发布时间】:2021-04-11 17:35:40
【问题描述】:
我正在使用文档https://shiny.rstudio.com/tutorial/written-tutorial/lesson2/,更准确地说是使用以下代码向我的闪亮页面添加一个简单的段落:
ui <- fluidPage(
titlePanel("My Shiny App"),
sidebarLayout(
sidebarPanel(),
mainPanel(
p("p creates a paragraph of text."),
p("A new p() command starts a new paragraph. Supply a style attribute to change the format of the entire paragraph.", style = "font-family: 'times'; font-si16pt"),
strong("strong() makes bold text."),
em("em() creates italicized (i.e, emphasized) text."),
br(),
code("code displays your text similar to computer code"),
div("div creates segments of text with a similar style. This division of text is all blue because I passed the argument 'style = color:blue' to div", style = "color:blue"),
br(),
p("span does the same thing as div, but it works with",
span("groups of words", style = "color:blue"),
"that appear inside a paragraph.")
)
)
)
我的目标是获取这些段落中的任何一段,比如说最后一段,并像在一个盒子里一样显示它,就像我们在这里看到的一样:
http://www.sthda.com/english/articles/40-regression-analysis/168-multiple-linear-regression-in-r/
在它说“图书馆(tidyverse)”的地方,这一段是在一个不同背景颜色的盒子里。
有谁知道我怎么能做到这一点?
我对 HTML 不太了解,因此我面临着艰难的时期。
谢谢
【问题讨论】:
-
或许答案here可以帮到你。
标签: r shiny shinydashboard shinyapps