Bootstrap 4参考手册
实用工具 | Utilities
图像替换 | Image replacement
使用图像替换类交换背景图像的文本。
利用.text-hide
类或mixin帮助用背景图像替换元素的文本内容。
<h1 class="text-hide">Custom heading</h1>
// Usage as a mixin
.heading {
@include text-hide;
}
使用.text-hide
该类来维护标题标签的可访问性和搜索引擎优化的好处,但希望利用background-image
而不是文本。
打开getbootstrap.com上的示例
<h1 class="text-hide" style="background-image: url('/assets/brand/bootstrap-solid.svg'); width: 50px; height: 50px;">Bootstrap</h1>
实用工具 | Utilities相关
Bootstrap 是一套用于 HTML、CSS 和 JS 开发的开源工具集。利用我们提供的 Sass 变量和大量 mixin、响应式栅格系统、可扩展的预制组件、基于 jQuery 的强大的插件系统,能够快速为你的想法开发出原型或者构建整个 app 。
主页 | https://getbootstrap.com/ |
源码 | https://github.com/twbs/bootstrap |
版本 | 4 |
发布版本 | 4.0.0-beta.2 |