精品久久久久久亚洲精品_成人午夜网站_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日本高清_亚洲精品久久久久午夜福

      欧美一区三区三区高中清蜜桃| 亚洲黄色在线看| 欧美日韩国产精品一卡| 欧美在线www| 一本色道88久久加勒比精品 | 欧美人妖另类| 久久青草久久| 欧美影院在线播放| 亚洲综合精品一区二区| 一本高清dvd不卡在线观看| 亚洲高清免费视频| 依依成人综合视频| 国语自产精品视频在线看抢先版结局 | 亚洲欧美日韩国产精品 | 亚洲综合日韩| 一本到高清视频免费精品| 91久久久久久久久久久久久| 影音先锋亚洲精品| 在线观看国产精品淫| 国产一区二区三区在线观看网站| 国产精品影院在线观看| 国产精品羞羞答答xxdd| 国产精品亚洲综合一区在线观看 | 国产裸体写真av一区二区| 国产精品久久久亚洲一区| 国产精品99免视看9| 欧美视频一区二区三区在线观看| 欧美日韩另类在线| 国产精品成人免费| 国产欧美精品在线播放| 国产自产高清不卡| 亚洲国产cao| 999亚洲国产精| 一区二区三区欧美| 亚洲主播在线播放| 久久不射电影网| 毛片一区二区| 欧美视频在线观看免费网址| 国产精品国产三级国产aⅴ9色| 国产精品一区三区| 激情五月***国产精品| 亚洲国内欧美| 在线一区二区三区做爰视频网站| 亚洲综合成人婷婷小说| 久久久久久黄| 欧美日本韩国一区| 国产欧美精品一区二区三区介绍| 狠狠色丁香久久婷婷综合丁香| 亚洲风情亚aⅴ在线发布| 99精品99久久久久久宅男| 亚洲欧美综合国产精品一区| 久久久久欧美| 欧美日韩一区在线观看视频| 国产一区二区看久久| 亚洲乱码日产精品bd| 午夜精品免费视频| 欧美日本亚洲| 精品动漫3d一区二区三区| 日韩一本二本av| 久久免费一区| 国产精品私拍pans大尺度在线| 亚洲国产精品嫩草影院| 亚洲欧美在线视频观看| 欧美激情小视频| 国语精品中文字幕| 亚洲欧美中文日韩在线| 欧美激情1区2区3区| 国产一区在线播放| 一区二区三区四区五区视频 | 99精品久久| 久久综合色8888| 国产精品综合| 在线亚洲一区二区| 欧美电影免费观看大全| 国产又爽又黄的激情精品视频 | 香蕉成人伊视频在线观看| 欧美成人精品在线播放| 在线精品国产成人综合| 久久精品免费看| 国产精品亚洲网站| 正在播放亚洲| 欧美日韩精品一二三区| 亚洲精品欧美在线| 欧美高清日韩| 91久久在线播放| 欧美激情按摩在线| 亚洲久久一区二区| 欧美高清在线视频| 日韩视频专区| 欧美三级资源在线| 亚洲一区在线播放| 国产精品成人久久久久| 亚洲一区二区网站| 国产精品影音先锋| 久久不射电影网| 国产亚洲一级| 美女被久久久| 亚洲精品久久在线| 欧美视频一区二区三区四区| 一区二区三区欧美在线观看| 欧美视频中文字幕在线| 亚洲香蕉在线观看| 国产日韩精品综合网站| 久久精品女人| 亚洲国产天堂久久综合网| 欧美精品激情| 亚洲摸下面视频| 国产亚洲人成a一在线v站| 玖玖玖免费嫩草在线影院一区| 尤物99国产成人精品视频| 欧美成年人在线观看| 一本久道久久综合中文字幕| 国产精品久久久久久五月尺| 久久九九免费| 99国产精品| 国产亚洲福利一区| 你懂的国产精品| 亚洲天堂视频在线观看| 国产在线一区二区三区四区| 欧美激情一区二区三区在线 | 国产精品一卡二卡| 免费成人黄色| 亚洲欧美激情在线视频| 在线观看亚洲专区| 国产精品高潮呻吟久久av无限| 久久av资源网| 在线一区观看| 亚洲高清视频一区二区| 国产精品一区二区黑丝| 欧美肥婆在线| 久久黄色网页| 亚洲午夜久久久| 亚洲国产综合在线| 国产婷婷色一区二区三区在线| 男人的天堂亚洲在线| 亚洲欧美春色| 日韩亚洲一区在线播放| 国产一区二区三区的电影| 欧美日韩你懂的| 狼人天天伊人久久| 久久精品91久久久久久再现| 日韩一级成人av| 亚洲高清资源| 韩国精品在线观看| 国产精品美女999| 欧美日韩影院| 欧美成人午夜剧场免费观看| 久久久久天天天天| 久久国产主播| 久久成人综合视频| 亚洲主播在线| 午夜精品久久久久影视| 亚洲深夜福利在线| 在线一区二区三区做爰视频网站| 最新国产成人av网站网址麻豆 | 91久久精品美女高潮| 国产亚洲视频在线观看| 国产欧美日韩视频| 国产欧美一区二区三区视频| 欧美色欧美亚洲另类七区| 欧美精品97| 欧美日韩免费观看一区| 欧美激情2020午夜免费观看| 男人的天堂亚洲在线| 欧美va天堂在线| 欧美国产精品久久| 欧美激情2020午夜免费观看| 欧美极品在线播放| 欧美日韩一区二区精品| 欧美日韩综合在线| 国产精品老女人精品视频| 国产精品va| 国产免费成人在线视频| 国产综合欧美在线看| 狠色狠色综合久久| 亚洲国产三级网| 99视频超级精品| 亚洲一区一卡| 久久精品五月| 欧美激情bt| 国产精品网站视频| 国语自产精品视频在线看8查询8| 亚洲国产精品久久久| 一区二区三区国产在线| 欧美亚洲综合久久| 久久亚洲综合网| 欧美人与禽猛交乱配| 国产精品国产三级国产| 黄色在线成人| 一区二区三区四区五区在线| 欧美一区二区精品| 欧美经典一区二区三区| 国产欧美精品久久| 亚洲人成网站精品片在线观看| 亚洲一区二区少妇| 米奇777超碰欧美日韩亚洲| 欧美午夜久久| 亚洲国产精品久久久久秋霞蜜臀| 亚洲欧美日韩国产精品| 欧美激情五月|