r - 从具有多行闪亮的模态中更改文本的字体大小
问题描述
我想在我的模式窗口中显示一些摘要报告,它有多行。如何更改文本的字体?
shinyApp(
ui = basicPage(
actionButton("show", "Show modal dialog")
),
server = function(input, output) {
observeEvent(input$show, {
str1 = paste('iris data frame has ', nrow(iris), 'rows')
str2 = paste('cars data frame has ', nrow(cars), 'rows')
showModal(modalDialog(
title = "Important message",
renderUI(HTML(paste(str1, str2, sep = '<br/>')))
))
})
}
)
解决方案
一个潜在可能:
library(shiny)
shinyApp(
ui = basicPage(
actionButton("show", "Show modal dialog")
),
server = function(input, output) {
observeEvent(input$show, {
str1 = tags$span(
paste('iris data frame has ', nrow(iris), 'rows'),
style = "font-size: 25px;"
)
str2 = tags$span(
paste('cars data frame has ', nrow(cars), 'rows'),
style = "font-size: 25px"
)
showModal(modalDialog(
title = "Important message",
tagList(str1, br(), str2)
))
})
}
)
推荐阅读
- python - 从文件加载值的配置模块的单元测试
- wordpress - WordPress Gutenberg: This block contains unexpected or invalid content
- wordpress - 具有高级自定义字段的 Elementor
- html - How to make table td full width in mobile?
- search - SAPUI5 Block searchfield while request is running
- java - Gradle 构建未使用的依赖项
- java - 缺少字符串资源 ID
- android - Custom Preference with AndroidX Preference
- javascript - eslint 警告 Unexpected unnamed async function ,无论如何要摆脱它?
- fastlane - 可以在非macos的环境中设置fastlane吗?