源代码:
下载代码
AI 编程工具
点击运行
<!DOCTYPE html> <html> <head> <title>Bootstrap5 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.staticfile.net/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.staticfile.net/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container mt-3"> <div class="container"> <h2>文本颜色</h2> <p>鼠标移动到链接。</p> <a href="#" class="text-muted">柔和的链接。</a> <a href="#" class="text-primary">主要链接。</a> <a href="#" class="text-success">成功链接。</a> <a href="#" class="text-info">信息文本链接。</a> <a href="#" class="text-warning">警告链接。</a> <a href="#" class="text-danger">危险链接。</a> <a href="#" class="text-secondary">副标题链接。</a> <a href="#" class="text-dark">深灰色链接。</a> <a href="#" class="text-light">浅灰色链接。</a> </div> </div> </body> </html>
运行结果: