顏色(Colors)

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

      顏色

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

      .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包裝元素內容,并將class套用在上面。

      Sass

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

      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,
        )
      )
      ),
      
      返回頂部
      主站蜘蛛池模板: 精品视频一区二区观看| 人妻无码一区二区不卡无码av| 亚洲国产综合精品中文第一区| 亚洲精品日韩一区二区小说| 亚洲国产精品第一区二区 | 一区二区和激情视频| 在线精品国产一区二区三区| 亚洲av无码成人影院一区| 亚洲综合一区二区国产精品| 国产一区二区三区在线看| 国产激情一区二区三区成人91| 精品无码国产AV一区二区三区| 久久久国产精品亚洲一区 | 精品视频一区二区| 日本精品一区二区在线播放| 国产乱人伦精品一区二区在线观看| 亚洲一区动漫卡通在线播放| 老熟女五十路乱子交尾中出一区 | av在线亚洲欧洲日产一区二区| 精品无码国产AV一区二区三区| 日韩a无吗一区二区三区| 天堂va视频一区二区| 国产一区二区影院| 一区二区三区电影网| 国产在线视频一区| 国产成人久久精品一区二区三区| 久久久国产精品一区二区18禁| 久久精品国产一区二区三区日韩| 无码乱人伦一区二区亚洲一| 亚洲综合无码一区二区| 无码精品尤物一区二区三区| 亚洲av色香蕉一区二区三区| 性色av无码免费一区二区三区| 国产凸凹视频一区二区| 亚洲午夜精品第一区二区8050| 91麻豆精品国产自产在线观看一区 | 亚洲制服中文字幕第一区| 麻豆果冻传媒2021精品传媒一区下载| 97一区二区三区四区久久| 无码一区二区三区亚洲人妻 | 亚洲欧美日韩一区二区三区在线 |