How can you trigger an alert to close automatically in Bootstrap?
- Using JavaScript/jQuery
- Adding the "alert-dismissible" class
- Setting a timer with the "data-dismiss" attribute
- Pressing the "ESC" key
To make an alert close automatically in Bootstrap, you can set a timer using the "data-dismiss" attribute. This attribute specifies the duration (in milliseconds) for which the alert will be visible before closing.
Loading...
Related Quiz
- Explain how the 'text-truncate' utility in Bootstrap is used in web design.
- How does Bootstrap facilitate keyboard navigation for accessible components?
- How do you ensure that custom components are responsive in Bootstrap?
- How can the 'shadow' utility in Bootstrap be applied to create depth in design?
- What is the primary purpose of using modals in Bootstrap?