soarli

flex布局水平垂直居中
<div class="box"> <section class=...
扫描右侧二维码阅读全文
22
2021/09

flex布局水平垂直居中

AI 文章摘要
提炼中... · 本文基于 qwen2.5:14b
✨ 正在提炼文章核心脉络…
<div class="box">
     <section class="inner"></section>
</div>
css
    .box {
            display: flex;
            justify-content: center; /* 水平居中 */
            align-items: center;     /* 垂直居中 */
            width: 1000px;
            height: 600px;
            border: 1px solid red;
        }
        .inner {
            width: 300px;
            height: 200px;
            background-color: red;
        }

原文地址:

www.jianshu.com/p/7baa3d4a1e9c

最后修改:2022 年 01 月 07 日 05 : 32 PM

👍 相关推荐

2026 年 11 月 13 日
为什么手机 App 可以跨十个版本直接升级,而 GitLab 却不行?揭秘移动端数据库的无缝迁移与自动化测试
2026 年 11 月 13 日
从前端打包产物到全栈系统还原:AI 逆向工程的能力边界与信息论本质
2026 年 10 月 31 日
ESXi 存储深度优化与排障全指南:从快照底层原理、系统盘瘦身、UNMAP 自动回收到文件死锁急救
✂️

💬 评论

0 / 1000