rawr..
15
如果pre块溢出,您可以使用它来使块水平滚动.
---
title: "Width test"
output:
html_document:
theme: default
---
pre {
overflow-x: auto;
}
pre code {
word-wrap: normal;
white-space: pre;
}
```{r global_options, echo = FALSE, include = FALSE}
options(width = 999)
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE,
cache = FALSE, tidy = FALSE, size = "small")
```
```{r}
sessionInfo()
```
```{r}
dataM
dataM
```
对于可滚动高度,创建一个具有最大高度和一个overflow-y: auto;或的容器divoverflow-y: scroll;
---
title: "Height test"
output:
html_document:
theme: default
---
.pre-scrolly {
max-height: 150px;
overflow-y: auto;
}
```{r}
sessionInfo()
```