2012-08-11 24 views

回答

0

只是改變positionfixed也會做

#a { 
    width: 2000px; 
    position: fixed; 
} 

Demo

0

您必須包裝在包裝,基本上是 「吃」 多餘寬度的元素:

的JavaScript

$('#a').wrap($('<div />', {'class': 'wrapper'})); 

CSS

.wrapper { 
    position: relative; 
    overflow: hidden; 

    height: 200px; /* .wrapper collapses if there is no height 
         and your elements are absolutely positioned */ 
}​ 

演示:http://jsfiddle.net/x2YGX/3/

0

使用CSS overflow

.animation 
{ 
/*other properties*/ 
overflow:hidden; 
} 
相關問題