提示訊息 - Alert
This is a primary alert—check it out!
This is a secondary alert—check it out!
This is a warning alert—check it out!
This is a danger alert—check it out!
1
2
3
4
5
6
7
8
9
10
11
12
<div class="alert alert-primary" data-alert role="alert">
This is a primary alert—check it out!
</div>
<div class="alert alert-secondary" data-alert role="alert">
This is a secondary alert—check it out!
</div>
<div class="alert alert-warn" data-alert role="alert">
This is a warning alert—check it out!
</div>
<div class="alert alert-danger" data-alert role="alert">
This is a danger alert—check it out!
</div>
This is a primary alert with an example link. Give it a click if you like.
This is a secondary alert with an example link. Give it a click if you like.
This is a warning alert with an example link. Give it a click if you like.
This is a danger alert with an example link. Give it a click if you like.
1
2
3
4
5
6
7
8
9
10
11
12
<div class="alert alert-primary" data-alert role="alert">
This is a 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" data-alert role="alert">
This is a secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-warn" data-alert role="alert">
This is a warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<div class="alert alert-danger" data-alert role="alert">
This is a danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
Well done!
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.
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
1
2
3
4
5
6
<div class="alert alert-primary" data-alert 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>
Holy guacamole! You should check in on some of those fields below.
1
2
3
4
5
6
<div class="alert alert-warn alert-dismissible fade show" data-alert role="alert">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>