Bootstrap 4 .border-left-0 類


使用 border-left-0 類移除元素的左邊框。

在 <div> 內使用類來移除 <div> 的左邊框 −

<div class="one border border-left-0">
  Removing left border
</div>

在 <div> 類中也設定了“one”類以調整其樣式 −

<style>
.one {
  width: 220px;
  height: 220px;
  margin: 50px;
}
</style>

您可以嘗試執行以下程式碼,以使用 border-left-0 類 −

示例

活動演示

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <style>
    .one {
      width: 220px;
      height: 220px;
      margin: 50px;
    }
    </style>
  </head>
<body>

<div class="container">
  <p>Bootstrap 4</p>
  <div class="one border border-left-0">Removing left border</div>
</div>

</body>
</html>

更新日期:2020 年 6 月 17 日

226 次檢視

開啟您的 職業生涯

完成課程以獲取認證

開始
廣告
© . All rights reserved.