顏色(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,
        )
      )
      ),
      
      返回頂部
      主站蜘蛛池模板: 日韩a无吗一区二区三区| 亚洲人AV永久一区二区三区久久 | 日韩人妻精品一区二区三区视频| 91video国产一区| 日韩精品无码视频一区二区蜜桃 | 免费无码一区二区| 国产精品视频一区麻豆| 91久久精品一区二区| 国内偷窥一区二区三区视频| 久久精品中文字幕一区| 日本一区二区高清不卡| 激情啪啪精品一区二区| 韩国一区二区三区| 国产一区二区三区播放| 国产aⅴ精品一区二区三区久久| 一区二区无码免费视频网站| 国产手机精品一区二区| 无码夜色一区二区三区| 亚洲欧美日韩一区二区三区| 一本一道波多野结衣AV一区| 久久青青草原一区二区| 日本免费电影一区| 免费无码AV一区二区| 久久成人国产精品一区二区| 香蕉视频一区二区三区| 国产在线精品一区二区不卡麻豆| а天堂中文最新一区二区三区| 久99精品视频在线观看婷亚洲片国产一区一级在线 | 麻豆果冻传媒2021精品传媒一区下载 | 中文字幕国产一区| 成人无码AV一区二区| 无码人妻久久一区二区三区免费| 国产精品伦一区二区三级视频 | 日本一区二区三区在线视频| 国产一国产一区秋霞在线观看| 亚洲一区日韩高清中文字幕亚洲| 日本亚洲成高清一区二区三区| 亚洲一区精彩视频| 国产在线精品一区在线观看| 精品少妇一区二区三区在线| 日韩电影一区二区|