Bootstrap 4 在bootstrap 4.5中设置视图端口的100%宽度

Bootstrap 4 在bootstrap 4.5中设置视图端口的100%宽度,bootstrap-4,Bootstrap 4,我试图在容器中使用class='row'获得100%的宽度 HTML结构: <div class="container"><!-- this is main container holding overall contents dont want to remove it --> <div class='row w-100 bg-dark' id='heading'> <h2>some headings<

我试图在容器中使用
class='row'
获得100%的宽度

HTML结构:

<div class="container"><!-- this is main container holding overall contents dont want to remove it -->
    <div class='row w-100 bg-dark' id='heading'>
      <h2>some headings</h2>
    </div>
    <article></article>
    <aside></aside>
    <footer></footer>
</div>

一些标题
带有
id='heading'
的行没有扩展到100%宽度,因为它在容器类中,我使用了布局实用程序w-100,但它不工作


如何强制此div扩展到100%,但仍保留在容器中?

尝试此操作,将两者分开,并将收割台放入
容器流体中

<article>
  <div class="container-fluid">
    <div class="row no-gutters" id="heading">
      <div class="col">
        <h2>some headings</h2>
      </div>
    </div>
  </div>
  <div class="container">
    <article></article>
    <aside></aside>
    <footer></footer>
  </div>
</article>

一些标题
同侧阴唇
同侧阴唇
同侧阴唇

yup容器是问题所在,请使用
容器流体
代替,同时在
上plop
无水槽
如果您不希望列之间有间距,则至少有一列应为
的子列,否则您的列会出现-15px的水平滚动条错误,这将影响整个布局!我只是想让标题100%不是另一个区域。亲爱的lawrence,问题是我不能移动容器类,它无论如何都会在那里,所以有没有什么方法可以覆盖父宽度并达到100%?任何东西都不应该一成不变,尤其是模板,移动/重构它是值得的。(去过那里)但是你可以在#header上使用绝对定位、固定定位或粘性定位,但这会带来其他问题,比如让它看起来像相对的。实际上我只是在做UI部分,它是硬编码的。所以我想我必须重构itI的附加位置:绝对;作为一个例子,但并不理想。希望能帮上忙。我会尝试一下,然后再给你回复。谢谢你,劳伦斯。