如何在 RMarkdown 中将此 table 移到左侧?
How can I move this table to the left in RMarkdown?
我的 RMarkdown 文档中有一个 DT 数据 table 允许用户下载到 csv。如何在我的 HTML 文件
中将此 table 移动到左侧
为了让整个文档向左移动,您可以在 Rmarkdown 中添加内联 CSS 代码,如下所示
---
title: "DT table"
author: "Daniel"
date: "5/22/2021"
output: html_document
---
<style type="text/css">
.main-container {
max-width: 1800px;
margin-left: auto;
margin-right: auto;
}
</style>
```{r, message=FALSE, warning=FALSE}
library(DT)
datatable(iris)
```
它在网络浏览器中一直呈现在左侧。
如果您 CSS 比我了解更多,那么您可以使用 Divs 和 CSS 选择器控制您的文档以获得更具体的布局
我的 RMarkdown 文档中有一个 DT 数据 table 允许用户下载到 csv。如何在我的 HTML 文件
中将此 table 移动到左侧为了让整个文档向左移动,您可以在 Rmarkdown 中添加内联 CSS 代码,如下所示
---
title: "DT table"
author: "Daniel"
date: "5/22/2021"
output: html_document
---
<style type="text/css">
.main-container {
max-width: 1800px;
margin-left: auto;
margin-right: auto;
}
</style>
```{r, message=FALSE, warning=FALSE}
library(DT)
datatable(iris)
```
它在网络浏览器中一直呈现在左侧。
如果您 CSS 比我了解更多,那么您可以使用 Divs 和 CSS 选择器控制您的文档以获得更具体的布局