【问题标题】:rmdformats::material changing the color scheme of green and greyrmdformats::material 改变绿色和灰色的配色方案
【发布时间】:2020-04-05 03:57:06
【问题描述】:

我想更改 rmdformats 中材质主题的颜色。例如,可以在顶部使用蓝色代替绿色。这是一个 reprex(r 笔记本,在 Rtudio 中运行):

---
output: rmdformats::material
css: custom.css
---


# Introduction 

Some Intro

# Another Section

Section Info

我的理解是我可以将“css:name_of_your_css.css”放在序言中,并以这种方式使用样式,但是我的 css 对针织 html 的影响为零,即使将 !important 放在我的属性之后正在努力改变。

【问题讨论】:

  • 嗯。在我的机器上运行良好。将.header-panelbackground-color 更改为红色,将body 中的font-family 调整为times,并通过选择器`.pages h1` 将标题1 的color 更改为红色。
  • 你能发布你的css代码@stefan吗?也许我在css中做了一些事情。
  • 刚刚发布它作为答案。
  • 你的序言和我的一样吗? @stefan
  • 是的。当然。 (; 将您的代码粘贴到一个空的 rmd 中。顺便说一句:我刚刚添加了一个屏幕截图。

标签: css r r-markdown


【解决方案1】:

我是custom.css@:

body {
  font-family: times, serif;
  color: #000000;
}

.header-panel {
  background-color: #E40019;
}

.pages h1 {
  color: #E40019;
}

【讨论】:

  • 我修改了我的 custom.css 文件以匹配您的文件,但完全不影响我的输出...
  • 我不知道,对我来说不起作用,我无法重现。
  • 有效!我一直在期待保存 css 文件...但是在更新 css 后,您必须手动保存大声笑,谢谢!
  • ((: 是的。对这种“愚蠢的错误”相当熟悉……(;
猜你喜欢
  • 1970-01-01
  • 2021-12-31
  • 1970-01-01
  • 2010-12-10
  • 1970-01-01
  • 2020-06-10
  • 1970-01-01
  • 2021-12-30
  • 1970-01-01
相关资源
最近更新 更多