twitter-bootstrap - 引导程序中对块引用的 bg-faded 效果
问题描述
我正在尝试在部分 class="content" id="testtimonals" 中使用“bg-faded”作为褪色背景,但它在页面上没有显示效果。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="css/bootstrap.min.css">
<title>Bootstrap</title>
</head>
<body>
<div class="container">
<section class="content" id="services">
<h2 class="text-danger">Our Mission</h2>
<p class="bg-danger text-white">Wisdom Pet Medicine strives to blend the best in traditional and alternative medicine in the diagnosis and treatment of companion animals including dogs, cats, birds, reptiles, rodents, and fish. We apply the wisdom garnered in the centuries old tradition of veterinary medicine, to find the safest treatments and cures.</p>
<ul>
<li><a href="#">Grooming</a></li>
<li><a href="#">General Health</a></li>
<li><a href="#">Nutrition</a></li>
<li><a href="#">Pest Control</a></li>
<li><a href="#">Vaccinations</a></li>
</ul>
</section>
<section class="content" id="testimonials">
<h2>Testimonials</h2>
<blockquote class="blockquote bg-faded text-info">
During the summer, our rabbit, Tonto, began to have severe redness and itching on his belly and feet. I'm very thankful to the veterinarians and staff at Wisdom for the excellent care Tonto received, and for nipping his allergies in the bud, so to speak.
<div class="blockquote-footer">
Jane
</div>
</blockquote>
</section>
</div><!-- content container -->
<script src="js/jquery.slim.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
请有人告诉我为什么它不起作用
解决方案
简短的回答:
替换.bg-faded
为.bg-light
,您的代码将正常工作,如this fiddle所示。
详细回答:
.bg-faded
来自Bootstrap的过时alpha 版本:
由于我猜您使用的是 Bootstrap 的 alpha 版本,因此我建议您参考当前的 v4.5 文档,其中.bg-faded
已替换为.bg-light
:
推荐阅读
- excel - Powershell 无法向 Excel 单元格添加值
- angular - 用户定义的 HttpInterceptor 的 StaticInjectorError 异常
- python - 提示用户输入 sudo 密码以通过 tkinter GUI 和 python3 运行 shell 命令
- sql - 将每个月的日期时间段设置为日期之间
- python - 如何将列转为索引,将行转为列
- sql - 使用带有 IN 子句的 IS NULL 处理可选参数
- python - Pandas - 将组填充到最大值
- scheme - 在 Scheme 中编写尾递归过程
- python - 如何在 Cloud Run 上为 python 烧瓶应用启用云调试器
- r - 即使它们具有相同的列,数据库也不会合并。导入时出现问题?