当前位置: 首页 > 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.rkmt.cn/news/5015.html

相关文章:

  • 【源码解读之 Mybatis】【基础篇】-- 第2篇:配置系统深度解析
  • PythonFlask 运用 DBUtils 创建通用连接池
  • MahMetro 框架学习
  • git clone操作报错diffie-hellman-group1-sha1的解决方案
  • 都可以!燕千云ITSM一站式接入全球主流AI大模型
  • 问题解决模板
  • 鸿蒙应用开发从入门到实战(五):ArkUI概述
  • ABC 423先慢慢改吧题解
  • 汇聚层交换机的替换要考虑到的因素
  • git 常见使用
  • python UV 包管理工具安装
  • latex 打印生僻字
  • 电机ADC采集
  • 道德经
  • Go by Example(3.Variables)
  • 9.3-9.10周报七
  • 学习心得
  • 基于Python+Vue开发的农产品商城管理系统源码+运行
  • 多人多次并发
  • B. Alternating Current
  • 深入解析:【JavaEE】网络原理初识
  • 爬虫逆向--Day22Day23--核心实战案例【荔枝网】【WASM学习】
  • Ubuntu上进行Zookeeper集群部署
  • A Survey of Reinforcement Learning for Large Reasoning Models - jack
  • 财务系统里面,怎么合并使用两个经费本号
  • 【火电机组、风能、储能】高比例风电电力系统储能运行及配置分析(Matlab代码实现) - 详解
  • Redis是如何进行内存管理的?缓存中有哪些常见问题?如何实现分布式锁?
  • 移远OPENCPU笔记
  • 2025.9.16——1绿
  • LGP5688 [CSP-S-JX 2019] 散步 学习笔记