From c065705128e902b036be2aa5a7efb06f2b77e4d9 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 22 Jun 2013 19:23:44 -0400 Subject: background image tweaks --- js/reveal.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index e95ec74..676122f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -272,6 +272,7 @@ var Reveal = (function(){ var data = { background: slide.getAttribute( 'data-background' ), backgroundSize: slide.getAttribute( 'data-background-size' ), + backgroundImage: slide.getAttribute( 'data-background-image' ), backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), backgroundPosition: slide.getAttribute( 'data-background-position' ), @@ -293,6 +294,7 @@ var Reveal = (function(){ // Additional and optional background properties if( data.backgroundSize ) element.style.backgroundSize = data.backgroundSize; + if( data.backgroundImage ) element.style.backgroundImage = 'url("' + data.backgroundImage + '")'; if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; if( data.backgroundRepeat ) element.style.backgroundRepeat = data.backgroundRepeat; if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition; -- cgit v1.2.3