0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

fixes #25343 by mentioning how collapse animates in docs

This commit is contained in:
Mark Otto 2018-03-31 18:36:10 -07:00
parent abe44dcc5b
commit b2e423f54d

View File

@ -6,6 +6,10 @@ group: components
toc: true toc: true
--- ---
## How it works
The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific elements you toggle. Collapsing an element will animate the `height` from it's current value to `0`. Given how CSS handles animations, you cannot use `padding` on a `.collapse` element. Instead, use the class as an independent wrapping element.
## Example ## Example
Click the buttons below to show and hide another element via class changes: Click the buttons below to show and hide another element via class changes: