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>
广告