css布局之flex应用


css 复制代码
		/*父  100*/
        .parent-div {
            /* 这里添加你想要的属性 */
            display: flex;
            flex-direction: row; //行
            justify-content: space-between; //左右对齐
            align-items: center;
            flex-wrap: wrap; //换行
        }
		/*中 90 +10 */
        .middle-div {
            /* 这里添加你想要的属性 */
            display: flex;
            flex-direction: row;
			align-items: center;
            flex-wrap: wrap;
        }
		/*子 每一个小div */
        .son-div {
            /* 这里添加你想要的属性 */
            flex-direction: row;
			margin: 5px 10px;
        }
        
html 复制代码
<div class="form-group parent-div"   >

                    <div class="middle-div" style="width: 90%; justify-content: left;">
                        <div class="son-div">
                            <a  class="search-button"  >导出</a>
                        </div>
                        <div class="son-div">
                            <input type="text" id="dc_ids"   class="form-control" style="width: 185px;" >
                        </div>                         
                    </div>


                    <div class="middle-div"  style="width: 10%;justify-content: right;flex-direction: row">
                        <div class="son-div">
                            <a  class="search-button"  >读卡</a>
                        </div>
                        <div class="son-div">
                            <a  class="search-button"  >查询</a>
                        </div>

                    </div>

                </div>
相关推荐
掘金01几秒前
EmbedPDF Vue 版 完整正文文档 全网首发
前端
OpenTiny社区2 分钟前
操作ArkTS页面跳转及路由相关心得
前端·typescript·web·opentiny
xiaohua0708day3 分钟前
Lodash库
前端·javascript·vue.js
huakoh3 分钟前
Claude Code 从零到上手指南:国产工具链复现80% Agent能力,DeepSeek+LangChain实战
前端
Ankkaya5 分钟前
浏览器插件接入 Google 登录
前端
Asmewill7 分钟前
DeepAgents学习笔记一(构建深度多智能体)
前端
万物皆对象6668 分钟前
切换路由时页面空白问题(vue3)
前端·vue.js·typescript
突然好热8 分钟前
TS 调试技巧
前端·javascript·typescript
h64648564h9 分钟前
Flutter 国际化(i18n)全指南:一键切换中/英/日多语言
前端·javascript·flutter
令人头秃的代码0_010 分钟前
AI时代下,如何做原子代码拆分
前端