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

Alerts

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Examples

Alerts are available for any length of text, as well as an optional close button. For proper styling, use one of the eight required contextual classes (e.g., .alert-success). For inline dismissal, use the alerts JavaScript plugin.

<div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert—check it out!
</div>
<div class="alert alert-success" role="alert">
A simple success alert—check it out!
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert—check it out!
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert—check it out!
</div>
<div class="alert alert-info" role="alert">
A simple info alert—check it out!
</div>
<div class="alert alert-light" role="alert">
A simple light alert—check it out!
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert—check it out!
</div>
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.

Use the .alert-link utility class to quickly provide matching colored links within any alert.

<div class="alert alert-primary" role="alert">
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-success" role="alert">
A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-info" role="alert">
A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-light" role="alert">
A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>

Additional content

Alerts can also contain additional HTML elements like headings, paragraphs and dividers.

<div class="alert alert-success" role="alert">
<h4 class="alert-heading">Well done!</h4>
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
<hr>
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>

Dismissing

Using the alert JavaScript plugin, it’s possible to dismiss any alert inline. Here’s how:

  • Be sure you’ve loaded the alert plugin, or the compiled Bootstrap JavaScript.
  • Add a close button and the .alert-dismissible class, which adds extra padding to the right of the alert and positions the close button.
  • On the close button, add the data-bs-dismiss="alert" attribute, which triggers the JavaScript functionality. Be sure to use the <button> element with it for proper behavior across all devices.
  • To animate alerts when dismissing them, be sure to add the .fade and .show classes.

You can see this in action with a live demo:

<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
When an alert is dismissed, the element is completely removed from the page structure. If a keyboard user dismisses the alert using the close button, their focus will suddenly be lost and, depending on the browser, reset to the start of the page/document. For this reason, we recommend including additional JavaScript that listens for the closed.bs.alert event and programmatically sets focus() to the most appropriate location in the page. If you’re planning to move focus to a non-interactive element that normally does not receive focus, make sure to add tabindex="-1" to the element.

Sass

Variables

$alert-padding-y:               $spacer;
$alert-padding-x:               $spacer;
$alert-margin-bottom:           1rem;
$alert-border-radius:           $border-radius;
$alert-link-font-weight:        $font-weight-bold;
$alert-border-width:            $border-width;
$alert-bg-scale:                -80%;
$alert-border-scale:            -70%;
$alert-color-scale:             40%;
$alert-dismissible-padding-r:   $alert-padding-x * 3; // 3x covers width of x plus default padding on either side

Variant mixin

Used in combination with $theme-colors to create contextual modifier classes for our alerts.

@mixin alert-variant($background, $border, $color) {
color: $color;
@include gradient-bg($background);
border-color: $border;

.alert-link {
color: shade-color($color, 20%);
}
}

Loop

Loop that generates the modifier classes with the alert-variant() mixin.

// Generate contextual modifier classes for colorizing the alert.

@each $state, $value in $theme-colors {
$alert-background: shift-color($value, $alert-bg-scale);
$alert-border: shift-color($value, $alert-border-scale);
$alert-color: shift-color($value, $alert-color-scale);
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
}
.alert-#{$state} {
@include alert-variant($alert-background, $alert-border, $alert-color);
}
}

JavaScript behavior

Triggers

Enable dismissal of an alert via JavaScript:

var alertList = document.querySelectorAll('.alert')
alertList.forEach(function (alert) {
new bootstrap.Alert(alert)
})

Or with data attributes on a button within the alert, as demonstrated above:

<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>

Note that closing an alert will remove it from the DOM.

Methods

You can create an alert instance with the alert constructor, for example:

var myAlert = document.getElementById('myAlert')
var bsAlert = new bootstrap.Alert(myAlert)

This makes an alert listen for click events on descendant elements which have the data-bs-dismiss="alert" attribute. (Not necessary when using the data-api’s auto-initialization.)

Method Description
close Closes an alert by removing it from the DOM. If the .fade and .show classes are present on the element, the alert will fade out before it is removed.
dispose Destroys an element's alert. (Removes stored data on the DOM element)
getInstance Static method which allows you to get the alert instance associated to a DOM element, you can use it like this: bootstrap.Alert.getInstance(alert)
var alertNode = document.querySelector('.alert')
var alert = bootstrap.Alert.getInstance(alertNode)
alert.close()

Events

Bootstrap’s alert plugin exposes a few events for hooking into alert functionality.

Event Description
close.bs.alert Fires immediately when the close instance method is called.
closed.bs.alert Fired when the alert has been closed and CSS transitions have completed.
var myAlert = document.getElementById('myAlert')
myAlert.addEventListener('closed.bs.alert', function () {
// do something, for instance, explicitly move focus to the most appropriate element,
  // so it doesn't get lost/reset to the start of the page
  // document.getElementById('...').focus()
})
返回頂部
精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

      狠狠入ady亚洲精品经典电影| 久久久久国色av免费看影院 | 日韩网站在线观看| 国产女主播一区二区三区| 免费久久99精品国产自| 亚洲欧洲99久久| 亚洲美女毛片| 在线看视频不卡| 国产精品亚洲第一区在线暖暖韩国| 欧美.日韩.国产.一区.二区| 性欧美精品高清| 在线亚洲免费视频| 亚洲国内高清视频| 国产一区亚洲| 国产欧美丝祙| 国产精品电影在线观看| 欧美日韩精品在线观看| 美女亚洲精品| 久久综合九色欧美综合狠狠| 久久aⅴ国产紧身牛仔裤| 日韩一二三在线视频播| 国产女人精品视频| 国产精品你懂的在线| 国产精品第一页第二页第三页| 欧美激情精品久久久| 蜜臀av国产精品久久久久| 久久综合色天天久久综合图片| 久久精品成人一区二区三区蜜臀| 午夜精品久久久久久久99樱桃 | 亚洲欧美99| 亚洲中午字幕| 亚洲欧美欧美一区二区三区| 亚洲午夜性刺激影院| 在线中文字幕一区| 亚洲综合色自拍一区| 午夜欧美不卡精品aaaaa| 亚洲欧美综合国产精品一区| 欧美一级艳片视频免费观看| 欧美在线免费看| 狂野欧美一区| 免费在线视频一区| 欧美激情国产日韩| 国产精品sss| 国产亚洲欧洲一区高清在线观看| 国产在线精品一区二区夜色| 亚洲大黄网站| 亚洲视频福利| 午夜视频一区二区| 免费成人网www| 欧美日韩国产专区| 国产小视频国产精品| 伊伊综合在线| 一区二区三区免费观看| 欧美中文在线视频| 欧美www视频在线观看| 欧美性色aⅴ视频一区日韩精品| 国产日韩欧美视频在线| 亚洲精品视频在线观看网站| 亚洲一区免费在线观看| 久久久久欧美精品| 欧美日韩综合一区| 狠狠色噜噜狠狠色综合久| 一本一本a久久| 久久久蜜桃精品| 国产精品a久久久久久| 精品成人国产| 亚洲综合首页| 欧美日本亚洲韩国国产| 国模精品一区二区三区| 亚洲午夜精品一区二区三区他趣| 久久精品中文字幕一区| 国产精品久久久久久久久久免费 | 久久一区免费| 国产精品网曝门| 亚洲精品久久久久久久久久久| 性欧美1819性猛交| 欧美少妇一区| 亚洲精选久久| 免费国产一区二区| 国内精品久久久久影院优| 亚洲一区制服诱惑| 国产精品swag| 亚洲一区www| 欧美日韩在线三区| 日韩网站在线| 欧美日韩精品综合| 日韩亚洲视频| 欧美日韩四区| 99在线精品观看| 欧美黄色大片网站| 亚洲理论在线| 欧美乱人伦中文字幕在线| 亚洲精品久久久蜜桃| 欧美激情精品久久久久久久变态 | 国产精品区一区| 亚洲一区国产精品| 国产精品视频福利| 亚洲一区二区三区精品在线观看| 欧美裸体一区二区三区| 亚洲精品久久久久久久久久久久| 麻豆精品在线视频| **欧美日韩vr在线| 牛牛影视久久网| 亚洲精品国偷自产在线99热| 欧美成人自拍视频| 亚洲精品男同| 国产精品扒开腿做爽爽爽软件| 亚洲午夜激情| 国产精一区二区三区| 久久精品视频免费观看| 亚洲黄色一区| 国产精品草草| 久久精品水蜜桃av综合天堂| 在线成人性视频| 欧美日韩国产精品成人| 亚洲午夜激情网页| 国产一区二区在线观看免费播放| 久久久亚洲精品一区二区三区 | 91久久精品一区二区别| 欧美日韩精品一区二区在线播放 | 亚洲伊人久久综合| 国产一区在线免费观看| 老司机一区二区三区| 亚洲免费观看| 国产一区二区毛片| 欧美日韩国产123区| 香蕉成人久久| 最新日韩av| 国产女主播一区二区| 欧美大学生性色视频| 亚洲欧美日韩国产成人精品影院| 一区二区在线不卡| 欧美午夜视频网站| 欧美成人免费在线| 欧美中文在线观看| 中文在线资源观看网站视频免费不卡 | 国产伦精品一区二区三区免费迷| 老司机免费视频一区二区| 亚洲视频电影图片偷拍一区| 伊甸园精品99久久久久久| 国产精品wwwwww| 欧美1区视频| 久久久亚洲综合| 午夜欧美大片免费观看| 一区二区欧美亚洲| 亚洲国产专区校园欧美| 韩国女主播一区| 国产欧美日韩一级| 国产精品日日摸夜夜添夜夜av | 亚洲精品国产视频| 狠狠干综合网| 国产一区二区黄| 国产精品人成在线观看免费| 欧美日韩人人澡狠狠躁视频| 欧美黑人在线播放| 欧美成人福利视频| 久久综合狠狠| 久久男女视频| 欧美在线看片| 欧美在线高清视频| 欧美在线一二三四区| 午夜精品久久| 西西人体一区二区| 午夜国产精品视频| 欧美一区二区三区四区在线观看 | 久久精品国产亚洲一区二区| 午夜精品电影| 午夜精品久久久久久久99樱桃 | 国产午夜精品在线观看| 国产三级欧美三级日产三级99| 国产精品私拍pans大尺度在线| 欧美午夜精品电影| 国产精品日韩一区| 国产精品久久一卡二卡| 国产精品夜色7777狼人| 国产欧美一区二区色老头| 国产午夜久久| 亚洲大片免费看| 亚洲精品欧美专区| 亚洲一区二区三区高清 | 国产情侣一区| 国产亚洲欧洲| 亚洲黄色在线看| 91久久线看在观草草青青| 日韩一区二区精品葵司在线| 一本色道久久综合亚洲精品不| 亚洲永久免费观看| 久久久久久一区二区| 欧美极品在线观看| 国产精品v欧美精品v日本精品动漫| 国产精品色婷婷| 影音先锋久久久| 夜夜嗨av色一区二区不卡| 小处雏高清一区二区三区| 美女国内精品自产拍在线播放| 欧美日韩免费一区二区三区视频| 国产精品久久久久三级| 在线观看日韩av| 亚洲一区二区三区精品视频| 久久久久免费视频|