在 Bootstrap 中內嵌子標題


若要將內聯子標題新增到任何標題,只需在任何元素周圍新增 <small> 或新增 .small 類,即可獲得較小的淺色文字。 

你可以嘗試執行以下程式碼來使用 Bootstrap 中的內聯子標題 −

示例

 即時演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/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/3.3.7/js/bootstrap.min.js"></script>
   </head>
   <body>
      <h1>Heading1 h1.
         <small>I'm secondary Heading h1</small>
      </h1>
      <h2>Heading2 h2.
         <small>I'm secondary Heading h2</small>
      </h2>
   </body>
</html>

更新於: 12-Jun-2020

773 次瀏覽

開啟您的 職業生涯

完成課程獲得認證

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