0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

Update dropdowns.md

This commit is contained in:
Mark Otto 2024-03-18 19:39:17 -07:00 committed by GitHub
parent e0bb4ffd0e
commit 62316f5409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -408,7 +408,6 @@ And putting it to use in a navbar:
Make the dropdown menu centered below the toggle with `.dropdown-center` on the parent element. Make the dropdown menu centered below the toggle with `.dropdown-center` on the parent element.
{{< example >}} {{< example >}}
<div class="d-inline-grid d-md-inline-flex gap-4">
<div class="dropdown-center"> <div class="dropdown-center">
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Centered dropdown Centered dropdown
@ -419,10 +418,12 @@ Make the dropdown menu centered below the toggle with `.dropdown-center` on the
<li><a class="dropdown-item" href="#">Action three</a></li> <li><a class="dropdown-item" href="#">Action three</a></li>
</ul> </ul>
</div> </div>
{{< /example >}}
{{< example >}}
<div class="btn-group dropdown-center"> <div class="btn-group dropdown-center">
<button class="btn btn-secondary" type="button"> <button class="btn btn-secondary" type="button">
Centered dropdown Split dropdown
</button> </button>
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span> <span class="visually-hidden">Toggle Dropdown</span>
@ -433,7 +434,6 @@ Make the dropdown menu centered below the toggle with `.dropdown-center` on the
<li><a class="dropdown-item" href="#">Action three</a></li> <li><a class="dropdown-item" href="#">Action three</a></li>
</ul> </ul>
</div> </div>
</div>
{{< /example >}} {{< /example >}}
### Dropup ### Dropup