Bootstrap3 Tutorial

Bootstrap Intro

Download BS3

Bootstrap Layout

BS3 Grid System

BS3 Typography

Bootstrap3 Table

Bootstrap3 Images

BS3 Jumbotron

Bootstrap3 Well

Bootstrap3 Alert

Bootstrap3 Button

BS3 Button Group

BS3 Glyphicons

Bootstrap3 Badges

BS3 Progress Bar

BS3 Pagination

Bootstrap3 Pager

Bootstrap3 Panel

Bootstrap3 Collapse

BS3 Menu, Tabs, Pills

BS3 Navigation Bar

Bootstrap3 Carousel

Bootstrap3 Modal

Bootstrap3 Tooltip

Bootstrap3 Scrollspy

Bootstrap3 Affix

Bootstrap3 Templates

Bootstrap Alert

Bootstrap provides an easy way to create predefined alert messages. Alerts are created with the .alert class, followed by one of the four contextual classes .alert-success, .alert-info, .alert-warning or .alert-danger:

Success! Indicates a successful or positive action.
Info! Indicates a neutral informative change or action.
Warning! Indicates a warning that might need attention.
Danger! Indicates a dangerous or potentially negative action.
<div class="alert alert-success">
  <strong>Success!</strong> Indicates a successful or positive action.
</div>

<div class="alert alert-info">
  <strong>Info!</strong> Indicates a neutral informative change or action.
</div>

<div class="alert alert-warning">
  <strong>Warning!</strong> Indicates a warning that might need attention.
</div>

<div class="alert alert-danger">
  <strong>Danger!</strong> Indicates a dangerous or potentially negative action.
</div>

Alert Links

Add the alert-link class to any links inside the alert box to create "matching colored links".

<div class="alert alert-success">
  <strong>Success!</strong> You should <a href="#" class="alert-link">read this message</a>.
</div>  
Success! You should read this message.
Info! You should read this message.
Warning! You should read this message.
Danger! You should read this message.

Closing Alerts

To close the alert message, add a .alert-dismissable class to the alert container. Then add class="close" and data-dismiss="alert" to a link or a button element (when you click on this the alert box will disappear).

 <div class="alert alert-success alert-dismissable">
  <a class="close" data-dismiss="alert">x
  <strong>Success!</strong> Indicates a successful or positive action.
</div>  
x Success! Indicates a successful or positive action.

Animated Alerts

The .fade and .in classes adds a fading effect when closing the alert message.

x Success! Indicates a successful or positive action.
<div class="alert alert-danger fade in">