图像替换 | Image replacement
使用图像替换类交换背景图像的文本。
利用.text-hide类或mixin帮助用背景图像替换元素的文本内容。
<h1 class="text-hide">Custom heading</h1>// Usage as a mixin
.heading {
@include text-hide;
}使用.text-hide该类来维护标题标签的可访问性和搜索引擎优化的好处,但希望利用background-image而不是文本。
<h1 class="text-hide" style="background-image: url('/assets/brand/bootstrap-solid.svg'); width: 50px; height: 50px;">Bootstrap</h1>本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

