Bootstrap CSS Classes

Bootstrap CSS class .flex-*-shrink-0

<div class="d-flex text-white">
  <div class="p-2 w-100 bg-primary">Flex item</div>
  <div class="p-2 flex-shrink-0 bg-success">Flex item</div>
</div>

<div class="d-flex text-white mt-2">
  <div class="p-2 w-100 bg-warning">Flex item</div>
  <div class="p-2 flex-sm-shrink-0 bg-danger">Flex item</div>
  <div class="p-2 flex-md-shrink-0 bg-warning">Flex item</div>
  <div class="p-2 flex-lg-shrink-0 bg-danger">Flex item</div>
  <div class="p-2 flex-xl-shrink-0 bg-warning">Flex item</div>
</div>

Preview

Are you tired of writing HTML by hand?

More Bootstrap CSS classes in Flexbox category

© 2024 Shuffle. All rights reserved.