manifest.js标题幻灯片覆盖

编程入门 行业动态 更新时间:2024-10-11 07:35:58
本文介绍了manifest.js标题幻灯片覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在第一个(标题)幻灯片的样式上与其他幻灯片略有不同. 如何使用以下方法为标题"幻灯片创建单独的部分环境:

I would like to style my reveal.js very first (title) slide slightly differently than my other slides. How could I create a separate section environment for "title" slides with:

  • 所有标题和文本都居中吗?
  • 所有内容在中间垂直对齐?
  • 我的默认(内容)幻灯片应左对齐,而不应垂直居中.这意味着在初始化部分Reveal.initialize({... center: false, ...})

    My default (content) slides should be left-aligned and not vertically centered. This means that in the init part Reveal.initialize({... center: false, ...})

    对于我的自定义 theme.css ,所有标题和段落文本均与text-align: left左对齐.

    And for my custom theme.css, all headings and paragraph text are left-aligned with text-align: left.

    我希望会有一些<section data-center=true>覆盖选项,但似乎没有.我一直在摆弄div,但我不是很棒的HTML/CSS专家.

    I was hoping there would be some <section data-center=true> override option, but there does not seem to be. I have been fiddling with div's, but I am no great HTML/CSS guru.

    作为后续问题,如果在幻灯片上使用<h1>,是否可以自动触发此问题?这将使我可以将外部Markdown用于内容而不是其他任何内容.

    As a follow up question, could this be automatically triggered if <h1> is used on a slide? That would allow me to use external Markdown for the contents and nothing else.

    推荐答案

    只需使用一个类为标题幻灯片命名空间

    Just use a class to namespace your title slide

    <section class="title-slide"> <h1>Title</h1> </section>

    并以比其他幻灯片更高的特异性对其进行样式设置

    and style it with a higher specificity than the other slides

    h1 { text-align: left; } .title-slide h1 { text-align: center; }

    这也应该解决您的第二个问题,而不必动态触发任何事情.

    This should address your second question as well without having to trigger anything dynamically.

    更多推荐

    manifest.js标题幻灯片覆盖

    本文发布于:2023-10-31 10:05:53,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1545763.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:幻灯片   标题   manifest   js

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!