【问题标题】:R markdonw ioslides title page format changesR markdown ioslides 标题页格式更改
【发布时间】:2015-09-03 04:27:18
【问题描述】:

我想改变当我们编织到 html 我的 ioslides 时出现的第一个标题页的外观。这是一个测试 Rmd 文件的标题:

    ---
    title: This test
    subtitle: that test
    author: jake
    output: 
       ioslides_presentation:
       incremental: true
       css: myCss4.css
    ---

我想要的是将标题居中(默认为左下角)并更改颜色和字体大小。我成功地改变了颜色和字体大小,但没有改变文本的位置......

这是我尝试过的自定义 css:

    slides > slide.title-slide hgroup h1 {
      font-weight: bold;
      font-size: 24pt;
      color:red;
      bottom: 50%;
    }

我尝试过 bottom:50%;, top=50% 和其他一些没有成功的事情...标题文本位置没有改变。我编码什么?还是有更好的方法来代替 css?

【问题讨论】:

  • 尝试包含position: absolute,然后添加top: 100px 或任何你想要的。
  • 我过去曾尝试过这个。它将标题向下移动。所以我刚刚尝试了 top: -100px 将标题向上移动......我不确定发生了什么。文本也折叠 = 2 行而不是 1 行

标签: html css r rstudio r-markdown


【解决方案1】:

尝试使用以下方法:

slides > slide.title-slide hgroup h1 {
  font-weight: bold;
  font-size: 24pt;
  color: red;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

【讨论】:

  • 感谢您的建议使标题消失。
  • 好像我的标题也消失了;但是,您提供的参数给了我一些线索
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-10-15
  • 2017-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-07-17
  • 2023-03-31
  • 2014-11-10
相关资源
最近更新 更多