嗨,我想在元素之前和之后添加字体真棒图标.但我不知道如何写它的CSS以及如何获得字体真棒图标链接将其放在css之后.
我已经创建了这样的结构.
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
</head>
<style>
.thish{position:relative; height:150px; width:150px ; background:red; }
.thish::before{position:absolute; content:'tyjthsrgd';right:40%; color:#000; bottom:0; height:30px; width:60px; background:green; z-index:1; }
</style>
<body>
<div class="thish">
</div>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
如果来自前一个字段或 Shift + Tab 如果来自下拉后的下一个字段,我想在按下 Tab 键时打开 Mat-Select 下拉菜单。如何实现这一目标?
现在,如图所示 - 帐户类型是我的 Mat-Select 下拉菜单。因此,如果我从帐户名称按 Tab 键,焦点将转移到帐户类型,但我想打开下拉菜单。就像 Wise 一样,如果我按公司的 Shift + Tab 组合键,我想打开“帐户类型”下拉菜单。
我经历了所有Angular Material Select API,但无法实现我的目标。
这是我的帐户类型下拉代码 -
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12 col-label-line-height">
<mat-label>Account Type </mat-label>
</div>
<div class="col-lg-8 col-md-8 col-sm-12">
<mat-form-field>
<mat-select formControlName="AccountTypeCode" [disabled]="this.DataService.LeaseCount" [(ngModel)]="AccountModel.AccountTypeCode">
<mat-option *ngFor="let AccountType of this.AccountTypeList" [value]="AccountType.Code">
{{ AccountType.Name }}
</mat-option>
</mat-select>
<mat-error *ngIf="hasError('AccountTypeCode', 'required')">Account Type is required</mat-error>
<mat-error *ngIf="hasError('CompanyCode', 'min')">Account Type is required</mat-error>
</mat-form-field>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
到目前为止,我已经尝试过 -
<div class="row"> …Run Code Online (Sandbox Code Playgroud)