引导程序选择不会在自动高度div上溢出

时间:2018-06-20 21:51:46

标签: css css3 twitter-bootstrap-3 bootstrap-select

我正在研究this demo。为什么.drop-down框中的.item无法显示/溢出?我必须保留.item自动的高度,但无法在其上启用可见的溢出。

.item{
    background:khaki;
    display: run-in;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
    padding-top:20px;
    padding-bottom:20px;
    }
    .dropdown-menu {
        z-index: 999999999999999999999999;
    }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<!-- Bootsrap Select -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/css/bootstrap-select.css" >
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.js"></script>


<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        <div class="item active">
            <select class="selectpicker" data-width="100%">
                <option>Select</option>
                <option>0.05</option>
                <option>0.05</option>
                <option>0.05</option>
                <option>0.15</option>
                <option>0.1</option>
                <option>0.05</option>
                <option>0.05</option>
                <option>0.05</option>
                <option>0.15</option>
            </select>
        </div>

    </div>

</div>

1 个答案:

答案 0 :(得分:1)

请使用“ carryel-inner”内部可见的“ overflow:visible”。将显示您的列表。参见下面的代码

.carousel-inner {overflow:visible!important}