当前位置: 首页 > news >正文

bootstrap-flex总结

一主轴方向、默认横线排布  flex-row(默认)。flex-column是竖向排列

<div class="d-flex "> <div class="p-2 bg-primary text-white">Item 1</div><div class="p-2 bg-success text-white">Item 2</div><div class="p-2 bg-warning text-dark">Item 3</div>
</div><hr>
<div class="d-flex flex-column "><div class="p-2 bg-primary text-white">aaa</div><div class="p-2 bg-success text-white">bbb</div><div class="p-2 bg-warning text-dark">ccc</div>
</div>

image

 

 

二、主轴对齐 (justify-content-*)

.justify-content-start: 项目靠主轴起点对齐 (默认)。

.justify-content-end: 项目靠主轴终点对齐。

.justify-content-center: 项目在主轴上居中对齐。

.justify-content-between: 第一个项目在起点,最后一个在终点,中间项目间距相等。

.justify-content-evenly: 项目间和项目与边缘的间距都相等。

 

<div class="d-flex justify-content-evenly "> <div class="p-2 bg-primary text-white">Item 1</div><div class="p-2 bg-success text-white">Item 2</div><div class="p-2 bg-warning text-dark">Item 3</div>
</div><hr>
<div class="d-flex justify-content-end "> <div class="p-2 bg-primary text-white">Item 1</div><div class="p-2 bg-success text-white">Item 2</div><div class="p-2 bg-warning text-dark">Item 3</div>
</div>

 

image

 

http://www.wxhsa.cn/company.asp?id=4499

相关文章:

  • 【源码解读之 Mybatis】【基础篇】-- 第2篇:配置系统深度解析
  • eSIM笔记
  • 拯救者Y7000过热降频解决方法
  • 普通大语言模型(LLM)和向量化模型(Embedding Model)的区别以及其各自的作用
  • ios电脑如何改成windows系统
  • PythonFlask 运用 DBUtils 创建通用连接池
  • 帧同步、快照同步与状态同步
  • 内存一致性模型
  • MahMetro 框架学习
  • 基于MATLAB的标准化降水蒸散指数(SPEI)实现
  • Prometheus Probe 监控配置文档
  • 客户案例|邦普循环x甄知科技,筑牢高效智能的IT运维底座
  • VMware Exporter 指标转换方案
  • 可5V使用引脚兼容STM32F103C8T6的国产32位MCU
  • git clone操作报错diffie-hellman-group1-sha1的解决方案
  • Celery inspect 常用命令手册
  • 都可以!燕千云ITSM一站式接入全球主流AI大模型
  • 删边最短路
  • 问题解决模板
  • 一站式接入全球股票数据:日本、美国、印度、马来西亚等多国API对接实战
  • 基于MATLAB的图像处理程序
  • 跨网文件安全交换系统推荐厂商详解
  • 走迷宫
  • MVC 架构解析
  • 鸿蒙应用开发从入门到实战(五):ArkUI概述
  • 好用的跨网文件安全交换系统:守护企业数据流转的核心屏障!
  • SIM笔记
  • 2025第五届“长城杯”网络安全大赛暨京津冀蒙网络安全技能竞赛 WP Web全
  • FTP替代工具哪个产品好,高效安全之选
  • c++之内存对齐模板类aligned_storage