为什么填充在我的 Bootstrap 5.3 页面中不起作用?

问题描述 投票:0回答:2
html twitter-bootstrap bootstrap-modal bootstrap-5 padding
2个回答
0
投票

也许是因为您正在使用:使用 p-4 进行常规填充,然后使用 pe-5 进行特定填充


0
投票

您的行周围没有所需的

.container
.container-fluid
类,因此行间距会导致水平溢出。这可能会给人留下您的填充不存在的印象。

https://getbootstrap.com/docs/5.3/layout/grid/#example

<head>
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
</head>

<body>
  <header class="container-fluid bg-info">
    <div class="row text-white">
      <div class="col-md-6 p-4 pe-5 ">
        <h2 class="">Adhnan M Y</h2>
      </div>
      <div class="col-md-6">
      </div>
    </div>
  </header>
</body>

© www.soinside.com 2019 - 2024. All rights reserved.