Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么在Rmarkdown中使用css会破坏tabset_Html_Css_R Markdown - Fatal编程技术网

Html 为什么在Rmarkdown中使用css会破坏tabset

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

我发现,如果我为一个部分指定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 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{}
选择器位于
主容器{}
上方。有关如何查看您(或任何)网页的信息,请参阅。