当前位置:K88软件开发文章中心编程全书编程全书03 → 文章内容

Bootstrap4 颜色

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-10 8:18:04

Bootstrap4颜色Bootstrap4提供了一些有代表意义的颜色类:.text-muted,.text-primary,.text-success,.text-info,.text-warning,.text-danger,.text-secondary,.text-white,.text-darkand.text-light:实例<divclass="container"><h2>代表指定意义的文本颜色</h2><pclass="text-muted">柔和的文本。</p><pclass="text-primary">重要的文本。</p><pclass="text-success">执行成功的文本。</p><pclass="text-info">代表一些提示信息的文本。</p><pclass="text-warning">警告文本。</p><pclass="text-danger">危险操作文本。</p><pclass="text-secondary">副标题。</p><pclass="text-dark">深灰色文字。</p><pclass="text-light">浅灰色文本(白色背景上看不清楚)。</p><pclass="text-white">白色文本(白色背景上看不清楚)。</p></div>尝试一下在链接中使用实例<divclass="container"><h2>文本颜色</h2><p>鼠标移动到链接。</p><ahref="#"class="text-muted">柔和的链接。</a><ahref="#"class="text-primary">主要链接。</a><ahref="#"class="text-success">成功链接。</a><ahref="#"class="text-info">信息文本链接。</a><ahref="#"class="text-warning">警告链接。</a><ahref="#"class="text-danger">危险链接。</a><ahref="#"class="text-secondary">副标题链接。</a><ahref="#"class="text-dark">深灰色链接。</a><ahref="#"class="text-light">浅灰色链接。</a></div>尝试一下背景颜色提供背景颜色的类有:.bg-primary,.bg-success,.bg-info,.bg-warning,.bg-danger,.bg-secondary,.bg-dark和.bg-light。注意背景颜色不会设置文本的颜色,在一些实例中你需要与.text-*类一起使用。实例<divclass="container"><h2>背景颜色</h2><pclass="bg-primarytext-white">重要的背景颜色。</p><pclass="bg-successtext-white">执行成功背景颜色。</p><pclass="bg-infotext-white">信息提示背景颜色。</p><pclass="bg-warningtext-white">警告背景颜色</p><pclass="bg-dangertext-white">危险背景颜色。</p><pclass="bg-secondarytext-white">副标题背景颜色。</p><pclass="bg-darktext-white">深灰背景颜色。</p><pclass="bg-lighttext-dark">浅灰背景颜色。</p></div>尝试一下

Bootstrap4 颜色