From the course: Bootstrap 4 Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Embeds - Bootstrap Tutorial
From the course: Bootstrap 4 Essential Training
Embeds
- [Instructor] Embeds are pieces of code that you can add from other websites. For example, when you want to import a YouTube video into your projects, or perhaps add a codepen, you copy and paste some code into your html. However, the problem is that they don't always display properly in Bootstrap, and so you can format them by adding some responsive classes. What you do is create a container around the embed and you give that container a class of embed-responsive. And then in addition to the embed-responsive class, you add an embed-responsive and then a size class. And this is really an aspect ratio of the proportions of the thing that you're embedding. So you can use any of these different labels here. So you can say embed-responsive 16 by nine, et cetera, et cetera. In addition to that, you can add an embed-responsive item directly into the iframe or whatever else you're using, but it's not required, so this is sort of an optional thing. Let's take a look at how the code works. So…
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)
-