In this video, Ray Villalobos goes through the code for collapses and accordions, two related interactive elements for showing and hiding content. Collapses is the simplest of the two, and lets you toggle specific HTML content. Accordions work in concert
- [Narrator] Collapse and accordions…are a set of related components…that allow you to show or hide HTML content.…Collapse is the simplest, and lets you show or hide…content on a click.…Accordions are similar but part of a bigger group.…When one item shows, another hides,…so accordions are essentially group of collapses.…To set up a collapse, you create a link or a button…that activates the collapse element.…To that element, you add a data-toggle="collapse,"…and to target the element, you can use either an ID…if it's an anchor tag or link,…or you can use a data-target attribute if it's a button.…
The element that's going to show or hide…has the collapse class.…Now as I mentioned, accordions are essentially…a group of collapses put together.…It does require an additional container,…and one of the elements should be showing…so you add the show class on that element,…and you'll need to add the class of dropdown-menu,…an it's common to put these in a card style.…Let's take a look at an example.…Here we have a couple of elements.…
- Creating a basic template
- Reviewing basic styles and typography
- Using colors with Bootstrap
- Working with classes that help you deal with images
- Working with grid containers
- Offsetting columns
- Using list groups to style lists, buttons, and links
- Using breadcrumbs
- Reviewing layout components
- Using form styles
- Working with interactive components
Skill Level Beginner
Responsive CSS with Sass and Compasswith Ray Villalobos3h 22m Intermediate
Building a Responsive Single-Page Design with Sasswith Ray Villalobos4h 55m Intermediate
1. Getting Started
2. Using Basic Styles
3. Mastering Layout with Bootstrap
4. Using Navs and Navbar Components
5. Basic Style Elements
6. Layout Components
7. Using Form Styles
8. Working with Interactive Components
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.