View on GitHub

Colored links

Colored links with hover states

You can use the .link-* classes to colorize links. Unlike the .text-* classes, these classes have a :hover and :focus state.

Colored links - 图1

html

  1. <a href="#" class="link-primary">Primary link</a>
  2. <a href="#" class="link-secondary">Secondary link</a>
  3. <a href="#" class="link-success">Success link</a>
  4. <a href="#" class="link-danger">Danger link</a>
  5. <a href="#" class="link-warning">Warning link</a>
  6. <a href="#" class="link-info">Info link</a>
  7. <a href="#" class="link-light">Light link</a>
  8. <a href="#" class="link-dark">Dark link</a>

Some of the link styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast.