简体   繁体   English

演示徽标和背景图片

[英]Presentation logo & background image

I am creating a report using slidy presentation and trying to embed a logo for all the slides and a background image in the first slide (As a cover page).我正在使用滑动演示创建报告,并尝试在第一张幻灯片中嵌入所有幻灯片的徽标和背景图像(作为封面)。 I have been trying for a while now, but unfortunately with no luck.我已经尝试了一段时间,但不幸的是没有运气。 The code I have works perfectly fine with ioslides presentation not slidy, and I want to use slidy as the size of the page is wider than ioslides.我的代码在 ioslides 演示文稿上工作得很好,不是 slidy,我想使用 slidy,因为页面的大小比 ioslides 宽。 Please help请帮忙

---
title: "10"
output:
   slidy_presentation:
      css: styles.css
logo : logo.png
biglogo : logo.png
date: "2022-11-01"
runtime: shiny
---
The CSS file "styles.css":

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

Update : So far I was able to add a background image on the right, and a small logo on the bottom left through css. However, the date now is beneath the small logo.更新:到目前为止,我可以在右侧添加背景图片,并通过 css 在左下角添加一个小徽标。但是,现在的日期在小徽标下方。 Any help guys to get the date back to its place, my CSS file:任何帮助人们将日期恢复到原位的人,我的 CSS 文件:

 div.slide.titlepage {
  text-align: left;
  background-image: url('logo_1.png');
  background-size: auto;
  background-repeat: no-repeat;
  background-position: right; 
}
div.slide.titlepage h1 {
  padding-bottom: 30%;
  margin-right: 0;
  background-image: url('logo.png');
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: 150px 60px;
}

You can directly manipulate the date text on the title slide in Slidy presentations.您可以在 Slidy 演示文稿中直接操作标题幻灯片上的日期文本。 It has the date class in HTML, which you can view by right-clicking on the document after opening the HTML file, then selecting Inspect Element or something similar, depending on your browser.它的date为 HTML 中的日期 class,您可以在打开 HTML 文件后右键单击该文档,然后根据您的浏览器选择检查元素或类似的东西来查看。

The following is a sample from the CSS template I used for my own application.以下是我在自己的应用程序中使用的 CSS 模板的示例。 Edit according to your needs.根据您的需要进行编辑。

.date {
  font-size: 32px;
  text-align: left;
  margin-left: 2%
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM