Visually hide an element while still allowing it to be exposed to assistive technologies (such as screen readers) with .visually-hidden. Use .visually-hidden-focusable to visually hide an element by default, but to display it when it’s focused (e.g. by a keyboard-only user). Can also be used as mixins.

    Visually hidden - 图1

    1. <h2 class="visually-hidden">Title for screen readers</h2>
    2. <a class="visually-hidden-focusable" href="#content">Skip to main content</a>
    1. // Usage as a mixin
    2. .visually-hidden-title {
    3. @include visually-hidden;
    4. }
    5. .skip-navigation {
    6. @include visually-hidden-focusable;
    7. }