首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Xaringan演示文稿中的项目符号颜色

Xaringan演示文稿中的项目符号颜色
EN

Stack Overflow用户
提问于 2019-05-28 17:24:01
回答 2查看 1.4K关注 0票数 0

是否可以更改Xaringan演示文稿中的项目符号颜色?文本应该有不同的颜色。

我没有在xaringanthemer包中找到任何选项,也没有检查css文件。我在remark.js文档中找不到任何信息。

EN

Stack Overflow用户

发布于 2019-05-28 18:17:03

您可以通过向Xaringan演示文稿的YAML标题添加自定义CSS来更改项目符号颜色。

下面是一个完全可重现的最小示例。

标记文件

代码语言:javascript
运行
复制
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)

代码语言:javascript
运行
复制
## Change bullet point colour

* An item
* Another item

自定义custom.css

我们采用了相关的CSS代码来主题化here中的要点。

代码语言:javascript
运行
复制
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) */
}

输出

票数 3
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56338948

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档