For a CSS animation to work in Bootstrap, the keyframes must be defined using the '___' rule.

  • @animate
  • @keyframes
  • #keyframes
  • animate-keyframes
In Bootstrap, the keyframes for CSS animations must be defined using the @keyframes rule. This rule allows you to specify the animation behavior at different stages. Using the correct syntax is essential for the proper functioning of CSS animations in Bootstrap.

Describe a scenario where using Sass nesting in Bootstrap would be more effective than traditional CSS.

  • Nesting allows for more scoped styles, avoiding global scope pollution.
  • Nesting helps in creating cleaner and more maintainable code when styling nested HTML structures.
  • Nesting enhances selector specificity, ensuring targeted styling in complex layouts.
  • Nesting can cause performance issues in large projects due to increased selector specificity.
In scenarios where you have deeply nested HTML structures, Sass nesting in Bootstrap proves effective by providing a more structured and maintainable way to write styles. Nesting avoids the need for repeating parent selectors and helps in creating a modular and organized stylesheet. This is particularly beneficial in large projects where traditional CSS may lead to global scope pollution and increased selector specificity issues.

In Bootstrap, which JavaScript method is used to programmatically open a modal?

  • showModal()
  • openModal()
  • show()
  • toggleModal()
In Bootstrap, the 'show()' method is used to programmatically open a modal. This method triggers the modal to become visible, and you can use it in JavaScript to control the modal's display based on specific events or conditions in your application.

Q1: Describe the steps to create a custom carousel component in Bootstrap.

  • Implementing a new Angular directive
  • Utilizing React's built-in carousel feature
  • Extending Bootstrap's carousel module
  • Creating a jQuery-based carousel
To create a custom carousel in Bootstrap, one must extend the existing carousel module. This involves modifying the carousel's HTML structure, incorporating necessary CSS styles, and initializing the custom JavaScript functions. Extending Bootstrap's carousel ensures compatibility and consistency with the framework.

What is the default trigger for Bootstrap Tooltips?

  • Click
  • Hover
  • Focus
  • Double click
The default trigger for Bootstrap Tooltips is "hover," meaning the tooltip is displayed when the user hovers over the specified element. This behavior is intuitive for providing additional information without requiring a click action.

Which tool is commonly used to test a website's cross-browser compatibility?

  • BrowserStack
  • Photoshop
  • Sublime Text
  • Google Analytics
BrowserStack is a popular tool for testing cross-browser compatibility. It allows developers to test their websites on various browsers and devices, helping identify and fix compatibility issues before the site goes live.

To override Bootstrap's default styles, developers usually use the ___ selector.

  • Descendant
  • Child
  • Sibling
  • Specific
To override Bootstrap's default styles, developers often use the more specific selector, such as the child selector (>), making "Child" the correct option.

What are the key differences between 'fixed' and 'fluid' layouts in the Bootstrap grid system?

  • 'Fixed' layouts are responsive, and 'fluid' layouts adapt to different screen sizes.
  • 'Fixed' layouts have a fixed width in pixels, while 'fluid' layouts are percentage-based and adjust to the screen size.
  • 'Fixed' layouts use percentage-based widths, while 'fluid' layouts have a fixed width in pixels.
  • Both 'fixed' and 'fluid' layouts have the same width, but 'fluid' layouts adjust automatically.
In Bootstrap, a 'fixed' layout has a fixed width in pixels, while a 'fluid' layout is percentage-based and adjusts to the screen size.

For better maintainability, Bootstrap components should be customized in a separate ___ file.

  • CSS
  • JavaScript
  • LESS
  • HTML
To enhance maintainability, Bootstrap components are customized in a separate LESS file. LESS is a backward-compatible language extension for CSS, allowing variables and other features that make it easier to manage styles.

How do you ensure that custom components are responsive in Bootstrap?

  • Use responsive utility classes provided by Bootstrap
  • Manually adjust the styles for different screen sizes
  • Use JavaScript to handle responsiveness
  • Bootstrap does not provide options for responsiveness
To ensure that custom components are responsive in Bootstrap, you should use the responsive utility classes provided by Bootstrap. These classes automatically adjust the component's styling based on the screen size, ensuring a consistent and responsive design across various devices and viewports.