代码示例:(标识:bs_txt_colors_opacity)
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap 实例</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.2/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.2/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container mt-3">
  <h1>不透明度文本颜色</h1>
  <p>请使用 .text-black-50 或 .text-white-50 类为黑色或白色文本添加 50% 的不透明度:</p>
  <p class="text-black-50">白色背景上不透明度为 50% 的黑色文本</p>
  <p class="text-white-50 bg-dark">黑色背景上不透明度为 50% 的白色文本</p>
</div>

</body>
</html>
运行结果: