Skip to content

Commit

Permalink
add for iframe backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Apr 27, 2017
1 parent b19dc7f commit caccf67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,9 @@ Automatically plays a full size video behind the slide.
```

##### Iframe Backgrounds
Embeds a web page as a background. Note that since the iframe is in the background layer, behind your slides, it is not possible to interact with the embedded page.
Embeds a web page as a slide background that covers 100% of the reveal.js width and height. The iframe is in the background layer, behind your slides, and as such it's not possible to interact with it by default. To make your background interactive, you can add the `data-background-interactive` attribute.
```html
<section data-background-iframe="https://slides.com">
<section data-background-iframe="https://slides.com" data-background-interactive>
<h2>Iframe</h2>
</section>
```
Expand Down
4 changes: 3 additions & 1 deletion css/reveal.css
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ body {
opacity: 1; }

.reveal .slides > section:empty,
.reveal .slides > section > section:empty {
.reveal .slides > section > section:empty,
.reveal .slides > section[data-background-interactive],
.reveal .slides > section > section[data-background-interactive] {
pointer-events: none; }

.reveal.center,
Expand Down
4 changes: 3 additions & 1 deletion css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,9 @@ body {
}

.reveal .slides>section:empty,
.reveal .slides>section>section:empty {
.reveal .slides>section>section:empty,
.reveal .slides>section[data-background-interactive],
.reveal .slides>section>section[data-background-interactive] {
pointer-events: none;
}

Expand Down

0 comments on commit caccf67

Please sign in to comment.