Bootstrap 4 .rounded-right 類


如果要對元素設定右圓角,請在 Bootstrap 4 中使用 rounded-right 類。

新增到網頁並不是一件繁瑣的任務。只需將類新增到 div 類中即可 −

<div class="one rounded-right"></div>

上面的一個類用於設定 div 的樣式 −

<style>
.one {
  width: 200px;
  height: 100px;
  background-color: #00FF00;
  margin: 8px;
}
</style>

你可以嘗試執行以下程式碼來實現 rounded-right 類 −

示例

線上示例

<!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: 200px;
       height: 100px;
       background-color: #00FF00;
       margin: 8px;
    }
    </style>
  </head>
<body>

<div class="container">
  <h2>Rounded Corner</h2>
  <p>We have a rectangle with right rounded corner:</p>
  <div class="one rounded-right"></div>
</div>

</body>
</html>

更新於:18-6-2020

192 次瀏覽

啟動您的職業

完成課程以獲取認證

準備起步
廣告
© . All rights reserved.