Html 为什么在Rmarkdown中使用css会破坏tabset
我发现,如果我为一个部分指定css,那么它会破坏文档该部分的Html 为什么在Rmarkdown中使用css会破坏tabset,html,css,r-markdown,Html,Css,R Markdown,我发现,如果我为一个部分指定css,那么它会破坏文档该部分的{.tabset}。请看下面的例子 有没有办法阻止这一切 --- title: "test" output: html_document --- <style type="text/css"> .mycontent{ } </style> # R Markdown Some text # Sets of working tabs {.tabset} ## Tab 1 ## Tab 2 # <div
{.tabset}
。请看下面的例子
有没有办法阻止这一切
---
title: "test"
output: html_document
---
<style type="text/css">
.mycontent{
}
</style>
# R Markdown
Some text
# Sets of working tabs {.tabset}
## Tab 1
## Tab 2
#
<div class="mycontent">
# Sets of broken tabs {.tabset}
## Tab 1
## Tab 2
</div>
---
标题:“测试”
输出:html\u文档
---
.mycontent{
}
#降价
一些文本
#工作选项卡集{.tabset}
##表1
##表2
#
#断开制表符集{.tabset}
##表1
##表2
该文件:
您可以通过向节头添加ID或类来使用CSS块自定义特定节,请参阅。显然,您可以忽略下面应用的CSS样式
---
title: "test"
output: html_document
---
```{css my-content, echo = FALSE}
.mycontent{
float: right;
color: blue;
}
```
# R Markdown
Some text
# Sets of working tabs {.tabset}
## Tab 1
## Tab 2
# Sets of broken tabs {.tabset .mycontent}
## Tab 1
## Tab 2
除了页眉,还有什么方法可以将其应用到我的大多数文档中吗?尝试将全局样式
正文{color:lightblue;}
添加到CSS块中。这似乎不适用于宽度,我将正文{max width:940px!important;}
添加到我的代码中,它除了正文之外还改变了标题的宽度。嗨,我相信您正在寻找样式。主容器{max width:940px;}
。尝试增加/减少px的值以查看差异。.body{}
选择器位于主容器{}
上方。有关如何查看您(或任何)网页的信息,请参阅。