代码之家  ›  专栏  ›  技术社区  ›  Hisham Mubarak

角度材料2中卡片外的文字内容2

  •  0
  • Hisham Mubarak  · 技术社区  · 9 年前

    Card content going out of card

    我的*ngFor卡代码如下所示

    <div class="col-md-3 eachCard" *ngFor="let note of allNotes">
        <md-card>
          <md-card-content>{{ note.noteText }}</md-card-content>
              <md-card-actions>
               <md-icon class="actionIcons" (click)="edit(note)">create</md-icon>
                  <md-icon class="actionIcons" (click)="delete(note)">clear</md-icon>
              </md-card-actions>
          </md-card>
     </div>
    
    1 回复  |  直到 9 年前
        1
  •  3
  •   MonsieurMan    9 年前

    您可以使用分词CSS属性:

    -ms-word-break: break-all;
        word-break: break-all;
    
     /* Non standard for WebKit */
        word-break: break-word;
    
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
        hyphens: auto;
    

    this excellent site.