引导程序4锚标记中断列

时间:2019-03-06 17:29:46

标签: bootstrap-4

我在引导4时遇到问题,在引导3中可以正常使用。

当我在3列或更多列之间添加链接时,它将cols放在另一行而不是内联。

当行中有标签时,如何阻止引导程序4破坏cols。

有没有办法解决这个问题?

https://codepen.io/wobstyr/pen/NJdyeR

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <title></title>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>

<body>
  <div class="container">
    <div class="row border">
      <a href="page1.html">
        <div class="col-12 col-sm-3">Happy</div>
        <div class="col-12 col-sm-3">Gilmore</div>
        <div class="col-12 col-sm-3">1987</div>
      </a>
      <div class="col-12 col-sm-3"><a href="delete.html">icon</a></div>
    </div>
    <div class="row border">
      <a href="page1.html">
        <div class="col-12 col-sm-3">Happy</div>
        <div class="col-12 col-sm-3">Gilmore</div>
        <div class="col-12 col-sm-3">1987</div>
      </a>
      <div class="col-12 col-sm-3"><a href="delete.html">icon</a></div>
    </div>
    <div class="row border">
      <a href="page1.html">
        <div class="col-12 col-sm-3">Happy</div>
        <div class="col-12 col-sm-3">Gilmore</div>
        <div class="col-12 col-sm-3">1987</div>
      </a>
      <div class="col-12 col-sm-3"><a href="delete.html">icon</a></div>
    </div>
    <div class="row border">
      <a href="page1.html">
        <div class="col-12 col-sm-3">Happy</div>
        <div class="col-12 col-sm-3">Gilmore</div>
        <div class="col-12 col-sm-3">1987</div>
      </a>
      <div class="col-12 col-sm-3"><a href="delete.html">icon</a></div>
    </div>
    <div class="row border">
      <a href="page1.html">
        <div class="col-12 col-sm-3">Happy</div>
        <div class="col-12 col-sm-3">Gilmore</div>
        <div class="col-12 col-sm-3">1987</div>
      </a>
      <div class="col-12 col-sm-3"><a href="delete.html">icon</a></div>
    </div>
  </div>
</body>

</html>

0 个答案:

没有答案