Bootstrap CSS Classes Flashcards
10 Questions
100 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does the class .active do?

  • Changes row color (correct)
  • Adds a light gray background to elements
  • Aligns text to the right
  • Sets the button's border
  • Which of the following are contextual classes available for alerts? (Select all that apply)

  • warning (correct)
  • success (correct)
  • info (correct)
  • failure
  • What does the class .bg-danger signify?

    It sets the background of an element to a dangerous color.

    What is the purpose of the .bg-faded class?

    <p>Applies a light gray background to elements.</p> Signup and view all the answers

    What class is used to create a block of buttons aligned vertically?

    <p>btn-group-vertical</p> Signup and view all the answers

    What is the default background color of the .btn-danger class?

    <p>Red</p> Signup and view all the answers

    What does the .btn-link class do?

    <p>Removes the outer border</p> Signup and view all the answers

    The .breadcrumb class indicates the current page's location within a navigational hierarchy.

    <p>True</p> Signup and view all the answers

    What is the purpose of the .card class?

    <p>Wraps each individual card.</p> Signup and view all the answers

    The class .btn-success defaults to a ______ background button.

    <p>green</p> Signup and view all the answers

    Study Notes

    Bootstrap CSS Classes Overview

    • .active: Contextual class used to change the background color of table rows.

    Alerts

    • .alert: Designed for alerts with eight contextual classes:
      • .alert-success
      • .alert-danger
      • .alert-dismissible
      • .alert-heading
      • .alert-info
      • .alert-link
      • .alert-warning

    Background Color Classes

    • .bg-danger: Changes the background color to the danger context, with a hover effect for link components.
    • .bg-faded: Applies a light gray background, commonly seen on navigation bars.
    • .bg-info: Similar to .bg-danger, this class sets the background color for info context items with hover effects.
    • .bg-inverse: Used with .navbar-dark for dark backgrounds and light text.
    • .bg-primary: Sets the background to primary context, also features hover effects.
    • .bg-success: Changes background to success context, maintaining hover effects.
    • .bg-warning: Similar to other background classes but for warning context.

    Blockquote Classes

    • .blockquote: Adds proper spacing and a left gray border to block quotes.
    • .blockquote-footer: A wrapping class for citation text under a blockquote, lightening the text color.
    • .blockquote-reverse: Aligns blockquote text to the right.
    • .breadcrumb: Indicates the current page's position within a navigational hierarchy.
    • .btn: Sets spacing and size for buttons.
    • .btn-block: Makes buttons span the full width of their parent container.

    Button Variants

    • .btn-danger: Creates a button with a default red background.
    • .btn-group: Groups multiple buttons together in a pill shape, separated by vertical lines.
    • .btn-group-lg: Enlarges the default button group size.
    • .btn-group-sm: Reduces the default button group size.
    • .btn-group-vertical: Stacks buttons vertically instead of horizontally.
    • .btn-info: Light blue information button.
    • .btn-lg: Specifies larger button sizes.
    • .btn-link: Button that removes the outer border but keeps spacing.
    • .btn-outline-*: Transparent background with colored text and border for various contexts.
    • .btn-primary: Used for the primary action within a set of buttons.
    • .btn-sm: For smaller button sizes.
    • .btn-success: Green background button with a dark border.
    • .btn-toolbar: Creates a row of buttons for pagination-like display.

    Card Components

    • .card: Class introduced to wrap individual card elements.
    • .card-*:: Prefix for contextual background colors in cards (e.g., .card-danger).
    • .card-block: Applied to the first child within a .card for consistent styling.
    • .card-blockquote: Removes margin from blockquote within a card for consistent spacing.
    • .card-columns: Applied to create a responsive grid-like layout for cards, maintaining equal height.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge of Bootstrap CSS classes with these flashcards. Each card provides a specific class and its definition, helping you understand how to effectively style your web elements. Perfect for beginners and web developers alike!

    More Like This

    Use Quizgecko on...
    Browser
    Browser