r - 如何使 Box 内的 bs4Dash Box 显示为内联且宽度相等
问题描述
使用 bs4Dash,我正在尝试创建一个包含其他几个框的框,使它们水平对齐,并且无论窗口有多大或多小,都跨越页面等距离。我能够使用 a 将框对齐div()
,但似乎无法使它们的宽度等距。
这是我的可重现示例:
if (interactive()) {
library(shiny)
library(bs4Dash)
shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
fluidRow(
box(width = 12, div(style="display: inline-block;vertical-align:top;", box(
solidHeader = FALSE,
title = "Status summary",
background = NULL,
width = 12,
status = "danger",
footer = fluidRow(
descriptionBlock(
number = "17%",
numberColor = "pink",
numberIcon = icon("caret-up"),
header = "$35,210.43",
text = "TOTAL REVENUE",
rightBorder = TRUE,
marginBottom = FALSE
),
descriptionBlock(
number = "18%",
numberColor = "secondary",
numberIcon = icon("caret-down"),
header = "1200",
text = "GOAL COMPLETION",
rightBorder = FALSE,
marginBottom = FALSE
)
)
)),
div(style="display: inline-block;vertical-align:top;", box(title = "second box", width = 12))
)
)
),
title = "Description Blocks"
),
server = function(input, output) { }
)
}
解决方案
推荐阅读
- hadoop - 减少映射器和减少器以在 Hive 中对非常大的表/视图进行简单查询
- google-bigquery - 如何在 Bigquery 中查询数组数据
- android - Android studio 3.2.1 使用 Api 级别 9 创建项目
- sql - 使用 Left 和 char 索引返回无效参数
- python - 将具有不可序列化元素的字典转换为字节并返回
- python - 使用 Selenium 的 Python 中的通用代码,用于从 UI 中读取值
- single-sign-on - CloudFront 分发与 OpenIdc Authenticated WebApp
- list - 通过在另一个列表中定义的自定义排序来比较 Kotlin 中的字符串
- sql - 如何使用 SQL 创建两个总计行 - 总计和平均值
- symfony - 如何在谷歌 HWIOAuthBundle/ 上检查 AOuth 登录失败的日志