CSS Bootstrap 可滚动选项卡面板内容

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25297398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 02:29:29  来源:igfitidea点击:

Bootstrap scrollable tab panel content

csstwitter-bootstrap

提问by user3425765

I'm wondering if I can make the content in my tab panel scrollable. I have tried a couple things but I don't get it sorted.

我想知道是否可以使选项卡面板中的内容可滚动。我已经尝试了几件事,但我没有把它整理好。

<div class="container">
<div class="row">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">Title</h3>
            <span class="pull-right">
                <ul class="nav panel-tabs">
                    <li class="active"><a href="#tab1" data-toggle="tab">Tab 1</a></li>
                </ul>
            </span>
        </div>            
        <div class="panel-body">
            <div class="tab-content">
                <div class="tab-pane active" id="test">
                    CONTENT
                </div>
            </div>
        </div>
    </div>
</div>

Fiddle:http://jsfiddle.net/f3p35v76/

小提琴:http : //jsfiddle.net/f3p35v76/

回答by M. Kobus

Are you looking for the content to scroll within the pane?

您是否正在寻找要在窗格内滚动的内容?

Fiddle: http://jsfiddle.net/uxsr66hp/1/

小提琴http: //jsfiddle.net/uxsr66hp/1/

.tab-pane{
  height:300px;
  overflow-y:scroll;
  width:100%;
}