更改 flexdashboard 中单个文本部分的字体大小 [英] Change font size for individual text section in flexdashboard

查看:57
本文介绍了更改 flexdashboard 中单个文本部分的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 flexdashboard 创建报告,我只想更改页面一部分的字体大小.

I'm using flexdashboard to create reports and I want to change a font size only for one part of the page.

感觉我可以通过添加CSS类来实现,但是我找不到如何在R markdown代码中指定类名.

It feels to me that I can do it by adding CSS class, but I can't find how can I specify class name in R markdown code.

有什么想法吗?

推荐答案

您可以将 CSS 直接添加到 Rmarkdown 文档中.例如,如果您想更改类chart-title"对象的字体,您可以将以下内容插入到您的 R markdown 文件中:

You can add CSS directly into your Rmarkdown document. For example, if you wanted to change the font of objects with class "chart-title" you could insert the following into your R markdown file:

---
title: "Title"
output: 
  flexdashboard::flex_dashboard:
theme: readable
orientation: columns
vertical_layout: fill
---

<style type="text/css">

.chart-title {  /* chart_title  */
   font-size: 30px;
   font-family: Algerian;

</style>

这篇关于更改 flexdashboard 中单个文本部分的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆