The usage of alerts in bootstrap

Source: Internet
Author: User

Warning Alerts use: Used to prompt the user for relevant information.

There are four basic display methods corresponding to: (information) Alert-info, (Success) alert-success, (Dangerous) Alert-danger, (warning) alert-warning. Example code:

<div class= "Alert Alert-info" > Text info Tips </div>

<div class= "Alert Alert-success" > Successful information Tips </div>

<div class= "alert Alert-danger" > Dangerous information Tips </div>

<div class= "alert alert-warning" > Warning Information tips </div>

As follows:

When writing alert this style, we also can see in the smart hint: alert-dismissable, alert-dismissiable, alert-link These styles have what effect, continue to look down:

<div class= "alert alert-info alert-dismissable" >

Tips For information

<button class= "Close" data-dismiss= "alert" aria-hidden= "true" >&times; </button>

</div>
<div class= "alert Alert-danger alert-dismissible" >

Dangerous tips

<button class= "Close" data-dismiss= "alert" aria-hidden= "true" >&times; </button>

</div>
<div class= "Alert Alert-success" >

<a href= "#" class= "alert-link" > Tips for Success </a>

<button class= "Close" data-dismiss= "alert" aria-hidden= "true" >&times;</button>

</div>

As follows:


Through the code and the display of the effect we can see alert-dismissable, alert-dismissiable, the combination of the button class= "close" data-dismiss= "alert" can achieve the effect of closing hints

The effect of Alert-link is to add a connection to the text of the hint, and the cursor is placed and clicked before the underline is displayed. Another aria-hidden= "True" is to facilitate screen readers such as some people with disabilities. &times; is an icon that is turned off.

The usage of alerts in bootstrap

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.