شرح صفوف ومحتوى الفقرة
- بعد ان نقوم بعمل display: flex باستخدام كلاس d-flex تاتي مرحلة تحديد اتجاه محاذاة العناصر داخل container.
- يستخدام كلاس flex-row لعمل محاذاة افقية وهي الوضع الافتراضي فتكون المحاذاة افقية وفي بداية container.
- يستخدام كلاس flex-row-reverse ايضا لعمل محاذاة افقية لكن تبدا المحاذاة من نهاية container وليس من البداية.
BootStrap Flex Row
عرض العناصر بترتيب افقي باستخدام flex-row و flex-row-reverse.
HTML
<div class="d-flex flex-row bg-primary text-white">
<div class="p-2 bg-danger">Flex item 1</div>
<div class="p-2 bg-warning">Flex item 2</div>
</div>
<div class="d-flex flex-row-reverse bg-primary mt-3 text-white">
<div class="p-2 bg-danger">Flex item 1</div>
<div class="p-2 bg-warning">Flex item 2</div>
</div>