我正在使用fxHide.lt-sm忽略将图像添加到网页。当我达到sm断点时,它会将所有内容从网页中删除。这行代码无法按预期运行,“”这是我的HTML代码。
<mat-grid-list cols="7" rowHeight="15vh" [gutterSize]="'0px'">
<mat-grid-tile
*ngFor="let tile of tiles; let i = index"
[colspan]="tile.cols"
[rowspan]="tile.rows"
[style.background-image]="tile.color"
[ngClass]="'tile' + i"
[ngStyle]="{'font-size': 'calc(' + tile.fontSize + 'rem + 0.5vw)', 'font-family': tile.fontFamily +', sans-serif;',
'padding-top':tile.paddingTop, 'margin-left':tile.marginLeft, 'margin-right':tile.marginRight, 'line-height': 1.6 }"
>
<div fxHide.lt-sm>
<ng-container *ngIf="tile.hasImage; else second">
<img [src]="tile.imageUrl"/>
</ng-container>
</div>
<ng-template #second>
<ng-container *ngIf="tile.hasButton ; else textContainer">
<a mat-button routerLink="/auth">Try BuySell For Free</a>
</ng-container>
</ng-template>
<ng-template #textContainer>
{{tile.text}}
</ng-template>
</mat-grid-tile>
</mat-grid-list>