【问题标题】:Adding an image to the title page of ioslides presentation在 ioslides 演示文稿的标题页中添加图像
【发布时间】:2017-05-25 14:06:54
【问题描述】:

是否可以在 ioslides 演示文稿的标题页中添加图像? 我想在 xyz 之后添加一个大徽标。

---
title: "Empowering Data-Driven Decisions at <br> xyz"
author: Omayma Said
date: Jan 11, 2017
output: ioslides_presentation
---

【问题讨论】:

标签: css r r-markdown ioslides


【解决方案1】:

是的。有一个标准选项可以包含ioslides bookdown documentation 中包含的小徽标,以及一些使用 css 制作自定义尺寸图像的代码。这个 css 可以放在单独的文档中,也可以放在文档开头的 YAML 标头之后,这通常在您只需添加几行时更容易。

这是一个使用bookdown documentation中的代码sn-ps将css放入文档中的示例。

---
output:
  ioslides_presentation:
    logo: logo.png
---

<script>

    .gdbar img {
        width: 300px !important;
        height: 150px !important;
        margin: 8px 8px;
    }

    .gdbar {
        width: 400px !important;
        height: 170px !important;
    }

    slides > slide:not(.nobackground):before {
        width: 150px;
        height: 75px;
        background-size: 150px 75px;
    }

</script>

# Transition slide

## First slide

【讨论】:

    【解决方案2】:

    是的,在 css 的帮助下是可能的。

    第一步是在markdown的输出中添加css:

    ---
    title: "Your <br> Title"
    author: "Author Name"
    date: "<div class = 'slide-date'>`r format(Sys.Date(),format='%B %Y')` <div>"
    output:
      ioslides_presentation:
        css: styles.css
    ---
    

    下一步是在你的styles.css文件中添加图片

    slides>slide.title-slide {
        background-image: url('title_image.png');
        background-size: 100% 100%;
    }
    

    编码愉快!

    【讨论】:

      猜你喜欢
      • 2016-07-17
      • 2015-11-24
      • 1970-01-01
      • 2017-02-08
      • 1970-01-01
      • 2015-10-31
      • 1970-01-01
      • 2014-07-30
      • 1970-01-01
      相关资源
      最近更新 更多