Bootstrap 類強調文字


HTML 的預設強調標籤(如 <small> 將文字字型設為父級文字的 85%, <strong> 用更粗的字型強調文字, <em> 用斜體強調文字。

你可以嘗試執行以下程式碼來強調文字 −

示例

 真實演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap emphasis tags</title>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
   </head>
   <body>
      <small>This content is within tag</small><br>
      <strong>This content is within tag</strong><br>
      <em>This content is within tag and is rendered as italics</em><br>
      <p class = "text-left">Left aligned text.</p>
      <p class = "text-center">Center aligned text.</p>
      <p class = "text-right">Right aligned text.</p>
      <p class = "text-muted">This content is muted</p>
      <p class = "text-primary">This content carries a primary class</p>
      <p class = "text-danger">This content carries a danger class</p>
   </body>
</html>

更新於: 12-Jun-2020

875 次瀏覽

啟動你的 職業生涯

完成課程,獲得認證

開始學習
廣告
© . All rights reserved.