顏色(Colors)

      借助一些顏色通用類別讓顏色的表達具有意義。這也包括支持有hover狀態(tài)的樣式連接。

      顏色

      使用color通用類別為文字上色。如果要為連接上色,你可以使用助手中的彩色鏈接。它們具有:hover and:focus的狀態(tài)。

      .text-primary

      .text-secondary

      .text-success

      .text-danger

      .text-warning

      .text-info

      .text-light

      .text-dark

      .text-body

      .text-muted

      .text-white

      .text-black-50

      .text-white-50

      <p class="text-primary">.text-primary</p>
      <p class="text-secondary">.text-secondary</p>
      <p class="text-success">.text-success</p>
      <p class="text-danger">.text-danger</p>
      <p class="text-warning bg-dark">.text-warning</p>
      <p class="text-info bg-dark">.text-info</p>
      <p class="text-light bg-dark">.text-light</p>
      <p class="text-dark">.text-dark</p>
      <p class="text-body">.text-body</p>
      <p class="text-muted">.text-muted</p>
      <p class="text-white bg-dark">.text-white</p>
      <p class="text-black-50">.text-black-50</p>
      <p class="text-white-50 bg-dark">.text-white-50</p>
      Conveying meaning to assistive technologies

      Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .visually-hidden class.

      處理特殊性

      有時候情境色彩并無法套用在其他的提取器,解決方案是用一個div包裝元素內(nèi)容,并將class套用在上面。

      Sass

      除了下面的Sass功能外,請考慮閱讀我們的CSS自定義屬性(aka CSS variables)中包含的顏色等內(nèi)容。

      Most color utilities are generated by our theme colors, reassigned from our generic color palette variables.

      $blue:    #0d6efd;
      $indigo:  #6610f2;
      $purple:  #6f42c1;
      $pink:    #d63384;
      $red:     #dc3545;
      $orange:  #fd7e14;
      $yellow:  #ffc107;
      $green:   #198754;
      $teal:    #20c997;
      $cyan:    #0dcaf0;
      
      $primary:       $blue;
      $secondary:     $gray-600;
      $success:       $green;
      $info:          $cyan;
      $warning:       $yellow;
      $danger:        $red;
      $light:         $gray-100;
      $dark:          $gray-900;
      

      Grayscale colors are also available, but only a subset are used to generate any utilities.

      $white:    #fff;
      $gray-100: #f8f9fa;
      $gray-200: #e9ecef;
      $gray-300: #dee2e6;
      $gray-400: #ced4da;
      $gray-500: #adb5bd;
      $gray-600: #6c757d;
      $gray-700: #495057;
      $gray-800: #343a40;
      $gray-900: #212529;
      $black:    #000;
      

      Map

      Theme colors are then put into a Sass map so we can loop over them to generate our utilities, component modifiers, and more.

      $theme-colors: (
      "primary":    $primary,
      "secondary":  $secondary,
      "success":    $success,
      "info":       $info,
      "warning":    $warning,
      "danger":     $danger,
      "light":      $light,
      "dark":       $dark
      );
      

      Grayscale colors are also available as a Sass map. This map is not used to generate any utilities.

      $grays: (
      "100": $gray-100,
      "200": $gray-200,
      "300": $gray-300,
      "400": $gray-400,
      "500": $gray-500,
      "600": $gray-600,
      "700": $gray-700,
      "800": $gray-800,
      "900": $gray-900
      );
      

      Utilities API

      Color utilities are declared in our utilities API in scss/_utilities.scss.

          "color": (
      property: color,
      class: text,
      values: map-merge(
        $theme-colors,
        (
          "white": $white,
          "body": $body-color,
          "muted": $text-muted,
          "black-50": rgba($black, .5),
          "white-50": rgba($white, .5),
          "reset": inherit,
        )
      )
      ),
      
      返回頂部
      主站蜘蛛池模板: 久久国产精品最新一区| 国产高清视频一区三区| 日本中文字幕在线视频一区| 无码中文字幕人妻在线一区二区三区| 国产精品亚洲一区二区三区在线| 国产午夜精品一区二区三区嫩草 | 天堂资源中文最新版在线一区| 视频在线观看一区二区三区| 夜色阁亚洲一区二区三区| 亚洲国产综合无码一区| 日韩在线不卡免费视频一区| 日韩美一区二区三区| 国产在线无码一区二区三区视频| 亚洲一区二区三区91| 男人的天堂亚洲一区二区三区| 国精产品一区二区三区糖心 | 国产成人无码精品一区不卡| 久久久精品日本一区二区三区| 蜜臀AV在线播放一区二区三区| 国产成人AV区一区二区三| 国产成人无码精品一区二区三区 | 风流老熟女一区二区三区| 国产午夜精品一区二区三区 | 亚洲视频一区二区三区| 国产一区二区三区内射高清| 久久久91精品国产一区二区三区 | 无码少妇A片一区二区三区| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 国产人妖在线观看一区二区| 日本在线不卡一区| 色精品一区二区三区| 精品一区二区三区无码免费视频| 国产伦精品一区二区三区视频小说| 国产乱码一区二区三区爽爽爽| 久久精品人妻一区二区三区 | 欧洲精品无码一区二区三区在线播放| 中文字幕日韩丝袜一区| 精品福利一区二区三区精品国产第一国产综合精品 | 在线观看一区二区三区视频| 亚洲国产精品一区二区成人片国内 | 国产精品视频一区二区三区四|