Skip to content

Commit caccf67

Browse files
committed
add for iframe backgrounds
1 parent b19dc7f commit caccf67

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ Automatically plays a full size video behind the slide.
602602
```
603603

604604
##### Iframe Backgrounds
605-
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.
605+
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.
606606
```html
607-
<section data-background-iframe="https://slides.com">
607+
<section data-background-iframe="https://slides.com" data-background-interactive>
608608
<h2>Iframe</h2>
609609
</section>
610610
```

css/reveal.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ body {
377377
opacity: 1; }
378378

379379
.reveal .slides > section:empty,
380-
.reveal .slides > section > section:empty {
380+
.reveal .slides > section > section:empty,
381+
.reveal .slides > section[data-background-interactive],
382+
.reveal .slides > section > section[data-background-interactive] {
381383
pointer-events: none; }
382384

383385
.reveal.center,

css/reveal.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ body {
446446
}
447447

448448
.reveal .slides>section:empty,
449-
.reveal .slides>section>section:empty {
449+
.reveal .slides>section>section:empty,
450+
.reveal .slides>section[data-background-interactive],
451+
.reveal .slides>section>section[data-background-interactive] {
450452
pointer-events: none;
451453
}
452454

0 commit comments

Comments
 (0)