css 无法将装订线设置为0英寸,container-fluid bootstap 5.2

e5nszbig  于 2022-11-19  发布在  其他
关注(0)|答案(1)|浏览(104)

你好,我读了所有关于我的问题的答案,而不是我的答案,我有这个Html与bottstap 5. 2:

<section id="title">

     <div class="container-fluid">

       <!-- Nav Bar -->

       <nav class="navbar navbar-expand-lg navbar-dark">
         <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
           <span class="navbar-toggler-icon"></span>
         </button>
         <div class="collapse navbar-collapse" id="navbarTogglerDemo01">
           <a class="navbar-brand">Lindog</a>
           <ul class="navbar-nav ms-auto">
             <li class="nav-item">
               <a class="nav-link" href="">Contact </a>
             </li>
             <li class="nav-item">
               <a class="nav-link" href="">Pricing</a>
             </li>
             <li class="nav-item">
               <a class="nav-link" href="">Download</a>
             </li>
           </ul>
         </div>
       </nav>

       <!-- Title -->


       <div class="row">
         <div class="col-lg-6">
           <h1>Meet new and interesting dogs nearby.</h1>
           <button type="button">Download</button>
           <button type="button">Download</button>
         </div>
         <div class="col-lg-6">
           <img src="images/iphone6.png" alt="iphone-mockup">
         </div>
       </div>
     </div>
   </section>

我想有填充周围。container-fluid顶部5%左右15%和底部5%我写在css:

.container-fluid{
  padding: 5% 15%;
}

它的dosent工作时,我inpect我的网站在chrome我看到这一节对我的css代码:

container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    width: 100%;
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);
    margin-right: auto;
    margin-left: auto;
}

如何删除这两个部分:

padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);

我尝试在行中使用mx-0,但没有成功

zy1mlcev

zy1mlcev1#

将**“g-0”**类与容器液体一起使用

相关问题