Browse Source

background image tweaks

Hakim El Hattab 11 years ago
parent
commit
c065705128
3 changed files with 4 additions and 2 deletions
  1. 2 0
      js/reveal.js
  2. 1 1
      js/reveal.min.js
  3. 1 1
      test/background.html

+ 2 - 0
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;

File diff suppressed because it is too large
+ 1 - 1
js/reveal.min.js


+ 1 - 1
test/background.html

@@ -65,7 +65,7 @@
 				<section data-background="#888888">
 					<h2>Same background twice (2/2)</h2>
 				</section>
-				
+
 			</div>
 
 		</div>

Some files were not shown because too many files changed in this diff