English 中文(简体)
如何在html表中显示同一属性中的4列,而不使数值翻一番?
原标题:How to display 4 columns of the same attribute without quadrupling the values ​in an html table?

我在Angular有一个系统,我称之为“oke魔 t镜”,我只关心“卡片、im子”特性,负责展示图像链接。 但是,我无法正常展示这些卡片。 目前有四舍五入。

<div class="scroll">
        <span class="font-extrabold text-3xl" style="color: #ffcb08;" *ngIf="spinner">Carregando cartas</span>
        <table  *ngIf="!spinner" mat-table [dataSource]="dataSource" class="mat-elevation-z8 mat-table">
        
          <ng-container  matColumnDef="position">
            <th mat-header-cell *matHeaderCellDef></th>
            <td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
          </ng-container>
          <ng-container  matColumnDef="position2">
            <th mat-header-cell *matHeaderCellDef></th>
            <td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
          </ng-container>
          <ng-container  matColumnDef="position3">
            <th mat-header-cell *matHeaderCellDef></th>
            <td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
          </ng-container>
          <ng-container  matColumnDef="position4">
            <th mat-header-cell *matHeaderCellDef></th>
            <td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
          </ng-container>
          <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
          <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
        
        </table>
      </div>

贺卡

最好看一下:desirable

问题回答

我认为,是因为你在桌旁有4个囚室。 每一行各式各样并重复手机,因此,一个单元的定义将足够!

<div class="scroll">
    <span class="font-extrabold text-3xl" style="color: #ffcb08;" *ngIf="spinner">Carregando cartas</span>
    <table *ngIf="!spinner" mat-table [dataSource]="dataSource" class="mat-elevation-z8 mat-table">
        <ng-container  matColumnDef="position">
            <th mat-header-cell *matHeaderCellDef></th>
            <td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
        </ng-container>
        <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
        <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
    </table>
</div>




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签