是否可以更改Xaringan演示文稿中的项目符号颜色?文本应该有不同的颜色。
我没有在xaringanthemer包中找到任何选项,也没有检查css文件。我在remark.js文档中找不到任何信息。
发布于 2019-05-28 18:17:03
您可以通过向Xaringan演示文稿的YAML标题添加自定义CSS来更改项目符号颜色。
下面是一个完全可重现的最小示例。
标记文件
title: "Example"
author: "Author"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
css:
- default
- default-fonts
- custom.css
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
```{r setup, include=FALSE}
选项(htmltools.dir.version= FALSE)
## Change bullet point colour
* An item
* Another item
自定义custom.css
我们采用了相关的CSS代码来主题化here中的要点。
ul {
list-style: none; /* Remove default bullets */
}
ul li::before {
content: "\2022"; /* Add content: \2022 is the CSS Code/unicode for a bullet */
color: red; /* Change the color */
font-weight: bold; /* If you want it to be bold */
display: inline-block; /* Needed to add space between the bullet and the text */
width: 1em; /* Also needed for space (tweak if needed) */
margin-left: -1em; /* Also needed for space (tweak if needed) */
}
输出
https://stackoverflow.com/questions/56338948
复制相似问题