From: Hakim El Hattab Date: Tue, 3 Jan 2012 08:11:05 +0000 (-0800) Subject: scrolling fallback mode for IE < 9 X-Git-Tag: 1.2.0~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=614b8cde660fb78e45b55490d0f6d8aefb9a35d9;p=reveal.js.git scrolling fallback mode for IE < 9 --- diff --git a/css/main.css b/css/main.css index 2a6b9db..2a590b7 100644 --- a/css/main.css +++ b/css/main.css @@ -872,3 +872,27 @@ html { } +/********************************************* + * FALLBACK + *********************************************/ + +.no-transforms { + overflow-y: auto; +} + +.no-transforms .slides section { + -webkit-transform: none; + -moz-transform: none; + -ms-transform: none; + transform: none; + + display: block!important; + opacity: 1!important; + position: relative!important; +} + + + + + + diff --git a/js/reveal.js b/js/reveal.js index aa5cc7d..767c4b9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -104,13 +104,26 @@ var Reveal = (function(){ supports3DTransforms = document.body.style['perspectiveProperty'] !== undefined || document.body.style['WebkitPerspective'] !== undefined || document.body.style['MozPerspective'] !== undefined || - document.body.style['msTransform'] !== undefined; + document.body.style['msPerspective'] !== undefined, + + supports2DTransforms = document.body.style['transformProperty'] !== undefined || + document.body.style['WebkitTransform'] !== undefined || + document.body.style['MozTransform'] !== undefined || + document.body.style['msTransform'] !== undefined || + document.body.style['OTransform'] !== undefined; /** * Starts up the slideshow by applying configuration * options and binding various events. */ function initialize( options ) { + + if( !supports2DTransforms && !supports3DTransforms ) { + document.body.setAttribute( 'class', 'no-transforms' ); + + return; + } + // Cache references to DOM elements dom.wrapper = document.querySelector( '#reveal' ); dom.progress = document.querySelector( '#reveal .progress' );