首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >角分量不对齐

角分量不对齐
EN

Stack Overflow用户
提问于 2022-04-21 07:54:41
回答 1查看 70关注 0票数 -1

在我的应用程序中,我有一个选项卡。在此选项卡中,有一个下拉列表和一个按钮。我想对齐这两个组件,同时对齐下拉到开始和按钮结束。我已经在我的代码中尝试过这种方法,正如您所看到的,它们仍然没有对齐。另外,我也不能水平拉伸下拉,它停留在像下面的图像。我应该怎么做才能实现我想要的?

代码:

代码语言:javascript
复制
<div fxLayout.gt-xs="row" fxLayoutAlign="space-between end" fxLayout="column" class="m-8 mb-16">
    <div fxLayout="column" class="mt-16 mr-8" fxLayoutAlign="start center">
        <mat-form-field appearance="outline" fxFlex fxFlex.gt-sm="100" class="pr-4">
            <mat-label>Şube Kodu Seçimi</mat-label>
            <mat-select [(ngModel)]="this._materialPlan.StockBranch" name="StockBranch">
                <mat-option *ngFor="let dp of branchList" [value]="dp">
                    {{dp.BranchName}}
                </mat-option>
            </mat-select>
        </mat-form-field>
    </div>
    <div fxLayout="column" class="mt-16 mr-8" fxLayoutAlign="end center" style="margin-top: 200px;">
            <button mat-stroked-button [ngClass]="{'purple-fg': EditIndex==undefined}" [disabled]="EditIndex!=undefined"
            (click)="openProductSelectionDialog(); workItemForm.reset();">
            Yeni Ürün
        </button>
    </div>
</div>
EN

回答 1

Stack Overflow用户

发布于 2022-04-21 08:05:19

您可以使用Flexbox轻松地解决这个问题。

代码语言:javascript
复制
.m-8 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

我建议添加适当的类名,而不是使用m-8,它可能是一个框架类?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71950781

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档