【问题标题】:Reveal JS Remove the fixed aspect ratio for a specific slideReveal JS 移除特定幻灯片的固定纵横比
【发布时间】:2015-07-07 07:59:00
【问题描述】:

我正在使用 Reveal JS 为我构建的应用程序创建演示文稿。

我想通过在 iframe 中嵌入演示文稿来演示应用程序。

但我希望 iframe 全屏显示。

传统上,revel js 中的所有幻灯片都有一个纵横比,该纵横比在reveal.js 文件中编码。

。 . .

( this, function() {

'use strict';

var Reveal;

var SLIDES_SELECTOR = '.slides section',
    HORIZONTAL_SLIDES_SELECTOR = '.slides>section',
    VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section',
    HOME_SLIDE_SELECTOR = '.slides>section:first-of-type',

    // Configuration defaults, can be overridden at initialization time
    config = {

        // The "normal" size of the presentation, aspect ratio will be preserved
        // when the presentation is scaled to fit different resolutions
        width: 960,
        height: 700,

。 . .

有没有什么办法可以去掉这个比例 节> ?

编辑:我已经尝试添加一个新的 CSS 类,其中填充和边距设置为 0,高度和宽度设置为所需大小。但这不起作用。

【问题讨论】:

  • 您可以将padding 设置为0 吗? section{padding:0;}

标签: javascript css html iframe reveal.js


【解决方案1】:

你应该添加一个类样式:

<section class="nopad">
    What you want to show
</section>

css:

section.nopad{
    padding: 0px;
    margin: 0px;
}

【讨论】:

  • 经过进一步研发,发现问题是由于js而不是css。请参考更新后的问题。
  • 也许你可以创建一个添加或删除nopad类样式的js函数......或者直接添加填充和边距0到样式
猜你喜欢
  • 2017-11-21
  • 1970-01-01
  • 2016-04-22
  • 1970-01-01
  • 1970-01-01
  • 2011-10-26
  • 2013-06-18
  • 2018-03-22
  • 2019-06-29
相关资源
最近更新 更多