- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图让显示模式从窗口底部弹出,但我就是无法让它工作,任何帮助都会很棒。
我一直在尝试使用下面的reveal js(原始代码)编辑打开函数。
谢谢
open : function (target, ajax_settings) {
if (target) {
if (typeof target.selector !== 'undefined') {
var modal = $('#' + target.data('reveal-id'));
} else {
var modal = $(this.scope);
ajax_settings = target;
}
} else {
var modal = $(this.scope);
}
if (!modal.hasClass('open')) {
var open_modal = $('[data-reveal].open');
if (typeof modal.data('css-top') === 'undefined') {
modal.data('css-top', parseInt(modal.css('top'), 10))
.data('offset', this.cache_offset(modal));
}
modal.trigger('open');
if (open_modal.length < 1) {
this.toggle_bg();
}
if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
this.hide(open_modal, this.settings.css.close);
this.show(modal, this.settings.css.open);
} else {
var self = this,
old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
$.extend(ajax_settings, {
success: function (data, textStatus, jqXHR) {
if ( $.isFunction(old_success) ) {
old_success(data, textStatus, jqXHR);
}
modal.html(data);
$(modal).foundation('section', 'reflow');
self.hide(open_modal, self.settings.css.close);
self.show(modal, self.settings.css.open);
}
});
$.ajax(ajax_settings);
}
}
},
show : function (el, css) {
// is modal
if (css) {
if (el.parent('body').length === 0) {
var placeholder = el.wrap('<div style="display: none;" />').parent();
el.on('closed.fndtn.reveal.wrapped', function() {
el.detach().appendTo(placeholder);
el.unwrap().unbind('closed.fndtn.reveal.wrapped');
});
el.detach().appendTo('body');
}
if (/pop/i.test(this.settings.animation)) {
css.top = $(window).scrollTop() - el.data('offset') + 'px';
var end_css = {
top: $(window).scrollTop() + el.data('css-top') + 'px',
opacity: 1
};
return this.delay(function () {
return el
.css(css)
.animate(end_css, this.settings.animation_speed, 'linear', function () {
this.locked = false;
el.trigger('opened');
}.bind(this))
.addClass('open');
}.bind(this), this.settings.animation_speed / 2);
}
if (/fade/i.test(this.settings.animation)) {
var end_css = {opacity: 1};
return this.delay(function () {
return el
.css(css)
.animate(end_css, this.settings.animation_speed, 'linear', function () {
this.locked = false;
el.trigger('opened');
}.bind(this))
.addClass('open');
}.bind(this), this.settings.animation_speed / 2);
}
return el.css(css).show().css({opacity: 1}).addClass('open').trigger('opened');
}
// should we animate the background?
if (/fade/i.test(this.settings.animation)) {
return el.fadeIn(this.settings.animation_speed / 2);
}
return el.show();
},
最佳答案
如果我正确理解您的问题,您可能需要尝试使用固定
定位覆盖Reveal的绝对
位置。
我遇到了一个问题,我可以从长页面底部的链接触发模式,但模式是在顶部打开的(用户必须向上滚动才能真正到达模式)。
.reveal-modal {
position: fixed; /* <- */
}
关于javascript - Zurb 基金会 Reveal Modal 从窗口底部打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20976943/
我一直有同样的问题——在 Reveal.js 中创建一组垂直幻灯片后,使用嵌套 Content Content 该垂直列表之后的下一张幻灯片无法正常工作。我的代码编辑器无法将其识别为 HTML,它
我正在使用 reveal.js进行演示。我正在使用 white 主题: 但是,最后一张幻灯片的主题应该是black。 我能做到吗?怎么办? 最佳答案 执行此操作的一个好方法可能是像这样在最后一张幻灯
我需要在同一页面上有多个模式窗口。基本上我打算有一个指向每个团队成员的链接,然后单击后会在模式框中弹出他们的详细信息。我正在使用 zurb 的 Reveal 插件。这是网站上的示例。 html:
在 Powerpoint 中,单击鼠标左键可前进到下一张幻灯片。在 reveal.js 中,它是使用键盘完成的。是否可以配置 reveal.js 在单击鼠标按钮时也前进到下一张幻灯片? 最佳答案 看起
到目前为止,我很喜欢 Reveal.js。不过,我遇到的一个问题是,我的无线演示 Remote 通常只能生成左/右箭头键击。我的 Reveal.js 幻灯片大量使用了它的二维功能以及片段。这意味着我的
我当前正在表格上使用“全部显示”按钮来显示所有表格条目: http://jsfiddle.net/SCpgC/ 但是,我想知道,有没有办法可以在单击时将“全部显示”切换为显示“较少显示”,以便用户可以
当 reveal.js 文件夹与 markdown 文件无关时,我无法使用 Pandoc 制作独立的 reveal.js 幻灯片。 一个简单的 Markdown 文件,Tester.md: # Tit
演讲者备注适用于默认的 reveal.js 演示文稿。 在我的演示文稿中,只要我添加 notes.js 依赖项,演示文稿就会停止工作。 我不知道是什么导致了这个问题。我测试了将默认演示文稿 index
我正在使用 Reveal.initialize({ slideNumber: true }) 是否可以隐藏扉页上的幻灯片编号? 最佳答案 我是这样做的: Reveal.addEventList
我有一个使用reveal.js 运行的演示文稿,一切正常。我正在编写一些示例代码,并且 highlight.js 在我的演示文稿中运行良好。但是,我想逐步显示代码。例如,假设我正在向您解释一个功能,我
有了reveal.js,不仅可以水平滑动,还可以通过垂直滑动添加第二个维度: slide1 slide2 A slide2 B slide2 C 但是,似乎只能从顶部的第一个小节开始(
假设我有一个简单的 reveal.js像这样滑动: Title Text Fragment 我想换 Text后颜色变为红色Fragment出现在屏幕上。我该怎么做? 最佳答案
我用 reveal.js 设置了一个演示文稿这意味着在无人看管的情况下使用。所以,我希望能够在所有指向“信息幻灯片”的幻灯片上显示一个小页脚(或其他地方的另一个链接),其中包含有关作者的数据、如何使用
我正在尝试使用reveal.js 进行演示。我尝试将图像添加到幻灯片中,但图像不会显示。这是我的代码 Slide Header Symptom:
我正在尝试使用语法高亮显示 reveal.js 中的演示文稿,但我不想使用 zenburn(默认设置),我想高亮显示用 R 编写的代码。我使用 highlight.js 生成为 R 定制的 css,但
我正在使用 Xaringan 编写演示文稿。我想嵌入视频,这样当我转换到包含视频的幻灯片时,它会自动全屏播放。 (即,我不想必须点击视频才能播放)。 我可以使用 revealjs 实现我想要的: ##
我已将幻灯片编号添加到我的展示 js 演示文稿中 Reveal.configure({ slideNumber: true }); Reveal.configure({
我尝试只在一个部分更改字体颜色,因为我添加了背景图片,否则您无法阅读白色: blablabla
我正在学习使用reveal.js,我发现它非常强大。 我想知道是否有可能在每次幻灯片转换时使显示播放声音。 我做了一个启用自动滑动选项的演示文稿,当幻灯片更改时发出声音会很有用。 有人能帮我吗 ? 谢
reveal.js 中默认使用哪个主题来高亮语法? 最佳答案 默认主题是 Zenburn,参见 index.html . 也可以在这里尝试 Zenburn:http://softwaremaniacs
我是一名优秀的程序员,十分优秀!