【发布时间】:2016-05-06 12:49:54
【问题描述】:
我有一张简单的桌子,想以闪亮的方式显示。但在默认设置中,边框单元格是透明的。这是代码...
output$tabel <-renderUI({
tabel1 <- matrix(c(1,2,3,4,5,6),2,3)
list(
renderTable(tabel1)
)
})
【问题讨论】:
我有一张简单的桌子,想以闪亮的方式显示。但在默认设置中,边框单元格是透明的。这是代码...
output$tabel <-renderUI({
tabel1 <- matrix(c(1,2,3,4,5,6),2,3)
list(
renderTable(tabel1)
)
})
【问题讨论】:
Shiny 只是 R 将 R 代码输出为 HTML 代码的包装器。您必须准确确定创建表的类,但检查here 表明它应该是shiny-html-output,然后您应该在其中有一个<table>。应该有一个shiny-table-output 的类,但我没有找到证明。
但是,当您发现这一点时,您只需向您的 R 中添加一个样式表。在该样式表中您将完成您的 CSS。
如果它是shiny-html-output 和shiny-table-output,它会很简单:
.shiny-html-output .shiny-table-output{ border: 1px solid #000; }
如果它只是 shiny-html-output 和 table,那么上面的内容相同,但改为 .shiny-html-output table。
就是这样。当你启动它们时,请尝试使用开发人员工具来检查浏览器的元素。大多数浏览器中的 F12 或右键单击检查是您所要做的。
【讨论】: