开发者

ExtJS Viewport issue

Hi I am designing a viewport.

How can I set only the vertical scrollbar for the viewport?

I am using the style: overflow-x: hidden; overflow-y: auto;开发者_运维技巧, for vertical scroll in the view port.


Here's some simple Ext.JS that will give you a Viewport with a single component inside it (using the Fit layout) that scrolls vertically (including some content that should be tall enough to make the scroll bar appear):

Ext.onReady(function(){
   new Ext.Viewport({
      layout: "fit",
      defaults: {autoScroll: true}, 
      items: [{
         html: "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
               "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>"
      }]
   })
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜