【问题标题】:Bootstrap container-build not filling the screen even with p-0即使使用 p-0,引导容器构建也不会填满屏幕
【发布时间】:2018-11-09 21:44:33
【问题描述】:

对于屏幕,我将容器流体的填充设置为 0,但屏幕仍然没有填满小于或等于宽度 1024 的屏幕。

.container-fluid {
    background-color: #e2e5f4;
    height: 600px; 
    margin-bottom: 200px;
    padding: 0;
}

什么有效: 1024-宽度:101%; 768-宽度:112%; 在 320- 宽度:112%;

HTML 代码:

<div class="container-fluid p-0">
    <div class="row border bg-danger p-0">
        <div class="col-md-7  p-0">
        <div class="MededX"> 
                MEDedX
        </div>
        <div class="capture_tittle">
            liunhliunh
            <br> lunliu luinu liuni 
            <br> nllniun Nilo ahh
        </div>

        <div class="subCapture_tittle">
            LOerm Swaminarayan swmainarayan swaminarayan swaminarayan                        

        </div>

    </div>

    <div class="col-md-5 p-0 ">

        <div>
            <img class= "hex" src="hex.png">
        </div>
        <div>
            <img class= "medIpad" src="medipad.png">
        </div>
        <div>
            <img class= "plantsLeft" src="plantsLeft.png">
        </div>

    </div>
    </div>  

</div>  

有什么问题?我该如何解决?

【问题讨论】:

    标签: html css bootstrap-4 containers


    【解决方案1】:

    使用自定义包装器并将其宽度设置为 100%。

    .container-full {
      margin: 0 auto;
      width: 100%;
    }
    

    或快速解决方案

    style="width:100%"
    

    【讨论】:

    • 不,我仍然不明白为什么 container-fluid 不起作用
    • 你的引导程序是什么版本的?
    • 我正在使用 chrome inspect 来检查 iPhone X。它可能是缩放。我怎么知道每个设备的写入缩放?当我放大时,它会在我切换设备时保存
    • 和引导程序 4
    • @j.doe 1) 用于缩放:在设备上@9​​87654323@
    猜你喜欢
    • 2021-05-26
    • 2020-07-20
    • 2021-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-20
    • 2021-11-26
    • 1970-01-01
    相关资源
    最近更新 更多