7

I am using Animate.CSS and I am using the "hinge" effect to have an image fall off the screen. When it goes off the screen it adds a vertical scroll bar to the page. When you scroll nothing is visible. Why is this scroll bar being added and how do I keep it from being added?

Thanks!

Code:

HTML

<img id="animate" class="fear" src="/2012/images/september/fear-sign.png" />

CSS

.fear{
     position:absolute;
     left:150px;
     top:0px;
}

#animate {
    -moz-animation-delay: 5s;
    -webkit-animation-delay: 5s;
    -o-animation-delay: 5s;
    -ms-animation-delay: 5s;
    animation-delay: 5s;
}

JS

var $j = jQuery.noConflict();
   $j(document).ready(function() {
       $j('#animate').addClass('animated hinge');
           });

Here is a fiddle I created.

McGarnagle
  • 96,448
  • 30
  • 213
  • 255
L84
  • 42,350
  • 55
  • 167
  • 243

3 Answers3

5

You can just use overflow:hidden, that will prevent the scroll bars:

html,body { overflow: hidden; }

Fiddle: http://jsfiddle.net/FafAH/2/

McGarnagle
  • 96,448
  • 30
  • 213
  • 255
1

Just add

body{overflow:hidden;}
Lodder
  • 19,583
  • 8
  • 57
  • 94
Arpit Srivastava
  • 2,209
  • 1
  • 14
  • 28
-1

You can set overflow-y to hidden to prevent vertical scrollbars and overflow-x to hidden to prevent horizontal scrollbars.

html, body{
    overflow-y: hidden;
}
iota
  • 34,586
  • 7
  • 32
  • 51