精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

Buttons

Use Bootstrap’s custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.

Examples

Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.

<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>

<button type="button" class="btn btn-link">Link</button>
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.

Disable text wrapping

If you don’t want the button text to wrap, you can add the .text-nowrap class to the button. In Sass, you can set $btn-white-space: nowrap to disable text wrapping for each button.

Button tags

The .btn classes are designed to be used with the <button> element. However, you can also use these classes on <a> or <input> elements (though some browsers may apply a slightly different rendering).

When using button classes on <a> elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a role="button" to appropriately convey their purpose to assistive technologies such as screen readers.

Link
<a class="btn btn-primary" href="#" role="button">Link</a>
<button class="btn btn-primary" type="submit">Button</button>
<input class="btn btn-primary" type="button" value="Input">
<input class="btn btn-primary" type="submit" value="Submit">
<input class="btn btn-primary" type="reset" value="Reset">

Outline buttons

In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the .btn-outline-* ones to remove all background images and colors on any button.

<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-secondary">Secondary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-warning">Warning</button>
<button type="button" class="btn btn-outline-info">Info</button>
<button type="button" class="btn btn-outline-light">Light</button>
<button type="button" class="btn btn-outline-dark">Dark</button>
Some of the button styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast.

Sizes

Fancy larger or smaller buttons? Add .btn-lg or .btn-sm for additional sizes.

<button type="button" class="btn btn-primary btn-lg">Large button</button>
<button type="button" class="btn btn-secondary btn-lg">Large button</button>
<button type="button" class="btn btn-primary btn-sm">Small button</button>
<button type="button" class="btn btn-secondary btn-sm">Small button</button>

Disabled state

Make buttons look inactive by adding the disabled boolean attribute to any <button> element. Disabled buttons have pointer-events: none applied to, preventing hover and active states from triggering.

<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button>
<button type="button" class="btn btn-secondary btn-lg" disabled>Button</button>

Disabled buttons using the <a> element behave a bit different:

  • <a>s don’t support the disabled attribute, so you must add the .disabled class to make it visually appear disabled.
  • Some future-friendly styles are included to disable all pointer-events on anchor buttons.
  • Disabled buttons should include the aria-disabled="true" attribute to indicate the state of the element to assistive technologies.
<a href="#" class="btn btn-primary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Primary link</a>
<a href="#" class="btn btn-secondary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Link</a>

The .disabled class uses pointer-events: none to try to disable the link functionality of <a>s, but that CSS property is not yet standardized. In addition, even in browsers that do support pointer-events: none, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, in addition to aria-disabled="true", also include a tabindex="-1" attribute on these links to prevent them from receiving keyboard focus, and use custom JavaScript to disable their functionality altogether.

Block buttons

Create responsive stacks of full-width, “block buttons” like those in Bootstrap 4 with a mix of our display and gap utilities. By using utilities instead of button specific classes, we have much greater control over spacing, alignment, and responsive behaviors.

<div class="d-grid gap-2">
<button class="btn btn-primary" type="button">Button</button>
<button class="btn btn-primary" type="button">Button</button>
</div>

Here we create a responsive variation, starting with vertically stacked buttons until the md breakpoint, where .d-md-block replaces the .d-grid class, thus nullifying the gap-2 utility. Resize your browser to see them change.

<div class="d-grid gap-2 d-md-block">
<button class="btn btn-primary" type="button">Button</button>
<button class="btn btn-primary" type="button">Button</button>
</div>

You can adjust the width of your block buttons with grid column width classes. For example, for a half-width “block button”, use .col-6. Center it horizontally with .mx-auto, too.

<div class="d-grid gap-2 col-6 mx-auto">
<button class="btn btn-primary" type="button">Button</button>
<button class="btn btn-primary" type="button">Button</button>
</div>

Additional utilities can be used to adjust the alignment of buttons when horizontal. Here we’ve taken our previous responsive example and added some flex utilities and a margin utility on the button to right align the buttons when they’re no longer stacked.

<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<button class="btn btn-primary me-md-2" type="button">Button</button>
<button class="btn btn-primary" type="button">Button</button>
</div>

Button plugin

The button plugin allows you to create simple on/off toggle buttons.

Visually, these toggle buttons are identical to the checkbox toggle buttons. However, they are conveyed differently by assistive technologies: the checkbox toggles will be announced by screen readers as “checked”/“not checked” (since, despite their appearance, they are fundamentally still checkboxes), whereas these toggle buttons will be announced as “button”/“button pressed”. The choice between these two approaches will depend on the type of toggle you are creating, and whether or not the toggle will make sense to users when announced as a checkbox or as an actual button.

Toggle states

Add data-bs-toggle="button" to toggle a button’s active state. If you’re pre-toggling a button, you must manually add the .active class and aria-pressed="true" to ensure that it is conveyed appropriately to assistive technologies.

<button type="button" class="btn btn-primary" data-bs-toggle="button" autocomplete="off">Toggle button</button>
<button type="button" class="btn btn-primary active" data-bs-toggle="button" autocomplete="off" aria-pressed="true">Active toggle button</button>
<button type="button" class="btn btn-primary" disabled data-bs-toggle="button" autocomplete="off">Disabled toggle button</button>
<a href="#" class="btn btn-primary" role="button" data-bs-toggle="button">Toggle link</a>
<a href="#" class="btn btn-primary active" role="button" data-bs-toggle="button" aria-pressed="true">Active toggle link</a>
<a href="#" class="btn btn-primary disabled" tabindex="-1" aria-disabled="true" role="button" data-bs-toggle="button">Disabled toggle link</a>

Methods

You can create a button instance with the button constructor, for example:

var button = document.getElementById('myButton')
var bsButton = new bootstrap.Button(button)
Method Description
toggle Toggles push state. Gives the button the appearance that it has been activated.
dispose Destroys an element's button. (Removes stored data on the DOM element)

For example, to toggle all buttons

var buttons = document.querySelectorAll('.btn')
buttons.forEach(function (button) {
var button = new bootstrap.Button(button)
button.toggle()
})

Sass

Variables

$btn-padding-y:               $input-btn-padding-y;
$btn-padding-x:               $input-btn-padding-x;
$btn-font-family:             $input-btn-font-family;
$btn-font-size:               $input-btn-font-size;
$btn-line-height:             $input-btn-line-height;
$btn-white-space:             null; // Set to `nowrap` to prevent text wrapping

$btn-padding-y-sm:            $input-btn-padding-y-sm;
$btn-padding-x-sm:            $input-btn-padding-x-sm;
$btn-font-size-sm:            $input-btn-font-size-sm;

$btn-padding-y-lg:            $input-btn-padding-y-lg;
$btn-padding-x-lg:            $input-btn-padding-x-lg;
$btn-font-size-lg:            $input-btn-font-size-lg;

$btn-border-width:            $input-btn-border-width;

$btn-font-weight:             $font-weight-normal;
$btn-box-shadow:              inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075);
$btn-focus-width:             $input-btn-focus-width;
$btn-focus-box-shadow:        $input-btn-focus-box-shadow;
$btn-disabled-opacity:        .65;
$btn-active-box-shadow:       inset 0 3px 5px rgba($black, .125);

$btn-link-color:              $link-color;
$btn-link-hover-color:        $link-hover-color;
$btn-link-disabled-color:     $gray-600;

// Allows for customizing button radius independently from global border radius
$btn-border-radius:           $border-radius;
$btn-border-radius-sm:        $border-radius-sm;
$btn-border-radius-lg:        $border-radius-lg;

$btn-transition:              color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;

$btn-hover-bg-shade-amount:       15%;
$btn-hover-bg-tint-amount:        15%;
$btn-hover-border-shade-amount:   20%;
$btn-hover-border-tint-amount:    10%;
$btn-active-bg-shade-amount:      20%;
$btn-active-bg-tint-amount:       20%;
$btn-active-border-shade-amount:  25%;
$btn-active-border-tint-amount:   10%;

Mixins

There are three mixins for buttons: button and button outline variant mixins (both based on $theme-colors), plus a button size mixin.

@mixin button-variant(
$background,
$border,
$color: color-contrast($background),
$hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
$hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
$hover-color: color-contrast($hover-background),
$active-background: if($color == $color-contrast-light, shade-color($background,$btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
$active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
$active-color: color-contrast($active-background),
$disabled-background: $background,
$disabled-border: $border,
$disabled-color: color-contrast($disabled-background)
) {
color: $color;
@include gradient-bg($background);
border-color: $border;
@include box-shadow($btn-box-shadow);

&:hover {
color: $hover-color;
@include gradient-bg($hover-background);
border-color: $hover-border;
}

.btn-check:focus + &,
&:focus {
color: $hover-color;
@include gradient-bg($hover-background);
border-color: $hover-border;
@if $enable-shadows {
  @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
} @else {
  // Avoid using mixin so we can pass custom focus shadow properly
      box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
}
}

.btn-check:checked + &,
.btn-check:active + &,
&:active,
&.active,
.show > &.dropdown-toggle {
color: $active-color;
background-color: $active-background;
// Remove CSS gradients if they're enabled
    background-image: if($enable-gradients, none, null);
border-color: $active-border;

&:focus {
  @if $enable-shadows {
    @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
  } @else {
    // Avoid using mixin so we can pass custom focus shadow properly
        box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
  }
}
}

&:disabled,
&.disabled {
color: $disabled-color;
background-color: $disabled-background;
// Remove CSS gradients if they're enabled
    background-image: if($enable-gradients, none, null);
border-color: $disabled-border;
}
}
@mixin button-outline-variant(
$color,
$color-hover: color-contrast($color),
$active-background: $color,
$active-border: $color,
$active-color: color-contrast($active-background)
) {
color: $color;
border-color: $color;

&:hover {
color: $color-hover;
background-color: $active-background;
border-color: $active-border;
}

.btn-check:focus + &,
&:focus {
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}

.btn-check:checked + &,
.btn-check:active + &,
&:active,
&.active,
&.dropdown-toggle.show {
color: $active-color;
background-color: $active-background;
border-color: $active-border;

&:focus {
  @if $enable-shadows {
    @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
  } @else {
    // Avoid using mixin so we can pass custom focus shadow properly
        box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
  }
}
}

&:disabled,
&.disabled {
color: $color;
background-color: transparent;
}
}
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
padding: $padding-y $padding-x;
@include font-size($font-size);
// Manually declare to provide an override to the browser default
  @include border-radius($border-radius, 0);
}

Loops

Button variants (for regular and outline buttons) use their respective mixins with our $theme-colors map to generate the modifier classes in scss/_buttons.scss.

@each $color, $value in $theme-colors {
.btn-#{$color} {
@include button-variant($value, $value);
}
}

@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value);
}
}
返回頂部
精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

      9000px;">

          色呦呦国产精品| 欧美高清hd18日本| 极品美女销魂一区二区三区| 一区二区三区高清不卡| 中文字幕免费不卡| 国产欧美一区二区在线| 欧美精品一区二区久久久| 欧美一区二区在线免费观看| 欧美欧美欧美欧美首页| 在线观看91av| 欧美一级理论性理论a| 欧美绝品在线观看成人午夜影视| 欧美日精品一区视频| 欧美日韩精品二区第二页| 欧美在线高清视频| 欧美精品高清视频| 欧美一级黄色录像| 久久综合久色欧美综合狠狠| 久久噜噜亚洲综合| 国产欧美一区二区在线| 中文字幕在线不卡| 亚洲国产一区二区三区青草影视| 日韩黄色在线观看| 国内精品伊人久久久久影院对白| 成人免费黄色大片| 色老综合老女人久久久| 欧美日韩国产综合视频在线观看 | 奇米精品一区二区三区在线观看| 日韩黄色片在线观看| 久久精品国产精品青草| 国产精品一区二区在线播放| 成人av综合一区| 精品视频1区2区3区| 欧美大度的电影原声| 中文幕一区二区三区久久蜜桃| 亚洲色欲色欲www在线观看| 亚洲成av人片一区二区三区| 麻豆国产精品777777在线| 成人精品视频网站| 欧美肥大bbwbbw高潮| 中文字幕第一区综合| 日韩av中文字幕一区二区三区| 国产成人av一区二区三区在线 | 久久久久国产精品免费免费搜索| 日韩美女视频19| 麻豆精品在线观看| 91影院在线观看| 在线综合视频播放| 最新高清无码专区| 国产在线观看免费一区| 日本电影欧美片| 久久久久久久综合日本| 亚洲成av人片在线观看| 国产精品 欧美精品| 91精品国产综合久久小美女| 亚洲人成小说网站色在线| 国产麻豆一精品一av一免费 | 国产综合久久久久久久久久久久| 一本色道久久综合精品竹菊| 精品国产凹凸成av人导航| 亚洲一区二区三区四区的| 国产 日韩 欧美大片| 日韩久久久精品| 亚洲图片欧美综合| 99re这里只有精品首页| 亚洲精品一区二区三区四区高清| 亚洲高清免费观看 | 精品国产免费人成电影在线观看四季 | 日韩欧美黄色影院| 午夜成人免费视频| 色综合中文综合网| 欧美日韩在线观看一区二区| 自拍偷拍亚洲激情| 99国产精品久久久久| 国产色综合久久| 国产成人午夜精品5599| 久久久久综合网| 国产一区二区三区精品欧美日韩一区二区三区| 欧美日韩国产一级| 五月天激情综合网| 91麻豆精品国产综合久久久久久| 一区二区三区国产精华| 欧美日韩一二三区| 亚洲高清视频的网址| 欧美区在线观看| 麻豆成人在线观看| 欧美mv日韩mv亚洲| 国产成人精品1024| 国产精品夫妻自拍| 91免费看`日韩一区二区| 亚洲免费av网站| 欧美性大战久久久久久久| 午夜欧美2019年伦理| 制服丝袜亚洲网站| 国产美女精品人人做人人爽 | 99国产精品99久久久久久| 一区二区三区在线免费视频| 欧美影视一区在线| 蜜臀久久久久久久| 国产三级三级三级精品8ⅰ区| 成人午夜又粗又硬又大| 亚洲视频一区二区在线观看| 欧美日韩国产首页| 国产精品123区| 亚洲免费在线观看视频| 欧美日韩久久一区二区| 美女国产一区二区| 国产精品第一页第二页第三页| 91免费版在线| 蜜臀va亚洲va欧美va天堂| www久久久久| 日本高清不卡在线观看| 麻豆极品一区二区三区| 亚洲素人一区二区| 欧美年轻男男videosbes| 国产成人精品免费视频网站| 婷婷开心激情综合| 国产精品全国免费观看高清| 欧洲av在线精品| 国产aⅴ综合色| 婷婷久久综合九色国产成人 | 欧美偷拍一区二区| 国产凹凸在线观看一区二区| 亚洲一二三级电影| 亚洲国产电影在线观看| 欧美一级二级在线观看| 日本乱人伦一区| 成人在线视频一区二区| 美女网站视频久久| 亚洲小说欧美激情另类| 国产色91在线| 日韩一级视频免费观看在线| 色综合久久中文字幕综合网| 国产精品资源网| 蜜臀av一级做a爰片久久| 亚洲免费高清视频在线| 欧美国产一区视频在线观看| 欧美精品日韩一区| 在线精品视频免费播放| 国产成人亚洲综合a∨婷婷图片| 日韩经典中文字幕一区| 亚洲精品国产a久久久久久| 久久无码av三级| 日韩欧美亚洲国产另类| 91国产精品成人| 91网站黄www| 97久久精品人人做人人爽| 国产福利精品一区| 国产一区二区三区观看| 男男成人高潮片免费网站| 亚洲午夜电影在线观看| 一区二区三区精品视频| 亚洲日本va午夜在线影院| 久久久99精品免费观看| 欧美一区二区二区| 337p亚洲精品色噜噜| 日韩一区二区三区免费观看 | 国产成人一区在线| 成人高清av在线| 91影院在线观看| 在线观看91视频| 欧美日韩精品一区二区在线播放| 91在线观看一区二区| 97久久久精品综合88久久| 99精品欧美一区二区蜜桃免费| 91一区二区在线观看| 97久久精品人人做人人爽| 色婷婷国产精品综合在线观看| 色综合久久中文字幕| 欧美色涩在线第一页| 欧美视频一区在线| 日韩视频免费观看高清完整版| 欧美一二三四区在线| 亚洲精品一区二区三区香蕉| 国产日产亚洲精品系列| 亚洲欧美一区二区不卡| 亚洲午夜激情av| 精品一区二区三区视频在线观看| 久久精品免费看| 99久久精品国产导航| 欧美精品黑人性xxxx| 久久精品免费在线观看| 国产精品久久精品日日| 亚洲高清在线视频| 国产一区激情在线| 91色在线porny| 日韩欧美国产精品一区| 国产欧美日韩在线| 亚洲精品中文在线影院| 秋霞电影网一区二区| 成人在线综合网| 911精品产国品一二三产区| 久久网站最新地址| 亚洲午夜一区二区| 国产成人午夜视频| 欧美日韩激情一区二区| 中文字幕电影一区| 美女视频免费一区| 欧美性生活久久| 久久精品亚洲乱码伦伦中文|