From the course: Bootstrap 4 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create alerts - Bootstrap Tutorial
From the course: Bootstrap 4 Essential Training
Create alerts
- [Instructor] Alerts are messages with special contextual styles that are designed to display in great looking boxes. They're optionally dismissed and can have any sort of markup so let's take a look at them. Now setting up alerts is pretty simply. You start out with the basic alert class on a container. There's a few contextual classes that you can use for color. So for example, success, info, warning, and danger. A few classes are available for internal content, like headings as well as links. Although you can fit just about any HTML content inside an alert. Now just be aware that it is really meant for very simple content, so don't try too many crazy HTML tags in there. You can choose to dismiss the alerts so that the user can get rid of message. This is how you do that. You add a class of alert-dismissible and then if you want some animation you can also add the fade and show classes. So when you dismiss the alert, it'll have a little animation that fades out. When you do this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Interactive component overview1m 24s
-
(Locked)
Add tooltips7m 21s
-
(Locked)
Display popovers5m 20s
-
(Locked)
Create alerts4m 14s
-
(Locked)
Use dropdowns8m 15s
-
(Locked)
Add collapse accordions12m
-
(Locked)
Use modals12m 3s
-
(Locked)
Build carousels13m 37s
-
(Locked)
Use scrollspy6m 56s
-
(Locked)
Toasts6m 10s
-
(Locked)
Spinners5m 34s
-
(Locked)
Pagination3m 21s
-
(Locked)
Stretched links3m 11s
-
(Locked)
Embeds3m 9s
-
(Locked)
-