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

      亚洲视频第一页| 久久精品二区亚洲w码| 国产精品国产成人国产三级| 欧美亚洲日本网站| 亚洲理论在线| 国产日韩成人精品| 国产精品videosex极品| 麻豆成人综合网| 午夜在线视频一区二区区别 | 欧美在线短视频| 99精品热6080yy久久| 怡红院精品视频| 国产精品一页| 欧美三日本三级三级在线播放| 欧美亚洲视频| 亚洲一区二区三区免费观看| 狠狠色丁香久久婷婷综合丁香 | 欧美先锋影音| 欧美日韩成人网| 欧美精品亚洲一区二区在线播放| 久久久最新网址| 久久夜色精品国产噜噜av| 欧美在线免费播放| 欧美在线观看视频在线| 欧美一级播放| 久久精品国产96久久久香蕉| 欧美一区影院| 久久国产一区二区三区| 久久精品视频va| 久久免费高清视频| 欧美成人免费在线视频| 欧美福利电影网| 欧美日韩性视频在线| 欧美男人的天堂| 男女av一区三区二区色多| 午夜影视日本亚洲欧洲精品| 精品1区2区| 久久亚洲综合色| 免费欧美高清视频| 久久免费视频这里只有精品| 亚洲天堂av图片| 99一区二区| 亚洲电影专区| 国产欧美一区二区精品性色| 欧美午夜一区二区三区免费大片| 欧美成人第一页| 可以免费看不卡的av网站| 久久国产色av| 久久精品久久99精品久久| 欧美日在线观看| 久久精品视频在线看| 国产毛片一区二区| 欧美+亚洲+精品+三区| 久久综合网络一区二区| 久久久久久黄| 久久成人免费日本黄色| 小嫩嫩精品导航| 欧美中文字幕视频在线观看| 欧美一区2区三区4区公司二百| 夜夜嗨av一区二区三区四季av| 亚洲精品视频免费| 日韩视频久久| 亚洲在线观看| 亚洲黄色在线| 尤物九九久久国产精品的特点| 国产精品国产馆在线真实露脸| 国产精品啊v在线| 国产女主播一区二区三区| 国产精品一二三四| 黄色日韩网站| 亚洲精品网站在线播放gif| 亚洲精品美女免费| 一区二区激情视频| 午夜精品av| 裸体女人亚洲精品一区| 欧美激情精品久久久久久| 久久精品国产一区二区三区| 亚洲人精品午夜在线观看| 欧美与欧洲交xxxx免费观看 | 亚洲欧美999| 尤物在线精品| 亚洲手机视频| 久久久国产精彩视频美女艺术照福利 | 艳女tv在线观看国产一区| 亚洲欧美日韩国产一区二区| 亚洲全黄一级网站| 欧美一区二区高清| 免费欧美日韩| 国产欧美一区视频| 一区二区电影免费在线观看| 欧美一级免费视频| 免费看精品久久片| 国产婷婷97碰碰久久人人蜜臀| 国产精品一区二区久久国产| 在线日韩av片| 亚洲视频在线视频| 久热精品视频在线| 国产精品久线观看视频| 欧美视频国产精品| 国产美女一区| 日韩一区二区精品在线观看| 久久精品99| 国产精品magnet| 亚洲欧洲日本国产| 久久精品二区亚洲w码| 国产精品家教| 国产视频一区在线| 亚洲第一免费播放区| 亚洲欧美日韩在线| 欧美日韩一区在线| 亚洲区在线播放| 毛片av中文字幕一区二区| 国产美女一区二区| 亚洲一区欧美二区| 欧美日韩国产成人在线观看| 亚洲电影有码| 日韩亚洲欧美在线观看| 久久久久久久久久看片| 国产欧美短视频| 亚洲一区精彩视频| 欧美三级电影一区| 最新亚洲视频| 欧美精品久久久久久久免费观看| 国内精品久久久久久久果冻传媒| 中文在线一区| 欧美无砖砖区免费| 亚洲伊人久久综合| 欧美成人久久| 亚洲精品影院| 欧美日韩综合一区| 亚洲欧美清纯在线制服| 国产精品一区二区久久久久| 激情校园亚洲| 欧美视频日韩视频在线观看| 日韩视频在线观看| 欧美日韩综合网| 香蕉免费一区二区三区在线观看 | 老司机67194精品线观看| 精品电影在线观看| 老司机精品视频一区二区三区| 欧美日韩一区二| 午夜在线精品| 狠狠色综合播放一区二区| 男女精品视频| 中日韩美女免费视频网站在线观看| 欧美视频一区二区在线观看 | 欧美激情影院| 亚洲国产精品精华液2区45| 欧美激情一区二区久久久| 亚洲一区三区电影在线观看| 国产一区二区成人| 欧美va天堂在线| 在线播放日韩| 噜噜爱69成人精品| 日韩亚洲成人av在线| 欧美成人r级一区二区三区| 久久久综合网站| 久久久精品久久久久| 国产精品一区2区| 91久久精品美女| 国产一区二区精品久久| 欧美人与禽猛交乱配视频| 欧美精品在线观看一区二区| 一区二区电影免费观看| 狠狠爱成人网| 国产精品免费电影| 久久中文精品| 亚洲私人影院在线观看| 有码中文亚洲精品| 国产精品扒开腿做爽爽爽视频 | 欧美日韩一区二区国产| 欧美一区二区日韩一区二区| 一本色道久久综合一区| 狠狠色噜噜狠狠狠狠色吗综合| 欧美日韩日本网| 激情av一区| 欧美三级在线视频| 久久精品中文字幕免费mv| 在线视频欧美精品| 亚洲精品日韩在线| 国户精品久久久久久久久久久不卡 | 乱中年女人伦av一区二区| 国模精品娜娜一二三区| 国产视频在线观看一区| 国产精品人人做人人爽人人添| 欧美大片在线观看| 久久久久久久久久久一区 | 亚洲精品国精品久久99热| 国产色产综合色产在线视频| 国产精品激情电影| 欧美日韩亚洲高清一区二区| 欧美激情欧美狂野欧美精品| 久久精品中文| 在线一区免费观看| 亚洲美女中文字幕| 亚洲美女诱惑| 一本综合久久| 一区二区三区久久久| 亚洲人成小说网站色在线| 伊人狠狠色丁香综合尤物|