为什么没有浮动的Bootstrap 4容器与浮动容器重叠?

时间:2017-12-02 06:48:59

标签: html css html5 css3 bootstrap-4

为什么没有浮动的Bootstrap 4容器与浮动容器重叠?这些框重叠,但只有列标题3的mn位于浮动列的框中。我认为浮动元素不会被其他元素所触及。

  <div class="border border-danger container float-right ml-1 mb-1 mr-1  mt-null ">
        <div class="row">
            <div class="col-md-12 float-right">
                <h3>Column title 1</h3> 
            </div>
            <div class="col-md-12 float-right">
                <h3>Column title 2</h3>  
            </div>
        </div>
    </div>
    <div class="border border-danger container position-sticky">
        <div class="row">
            <div class="col-md-12 float-right"> 
                <h3>Column title 3</h3> 
                <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> 
            </div>
        </div>
    </div>

0 个答案:

没有答案