كيفية التعديل على تنسيق MatTooltip

المصدر:
https://g.co/bard/share/5ad323e715d0


استخدام الأنماط المضمنة:

  • أضف الأنماط مباشرة إلى عنصر matTooltip في القالب الخاص بك:
<img *ngIf="loading === false; else spinner" class="mx-auto d-block" [src]="item.image"
style="width: 200px; height: auto; padding: 10px;"
 [matTooltip]="translateService.currentLang === 'ar'?
item.ar_description: item.en_description"
alt="{{translateService.currentLang === 'ar'? item.ar_name: item.en_name}}"
 matTooltipClass="custom-tooltip-class">



  • حدد فئة تلميح الأدوات المخصصة في ملف style.css الخاص بك:

.custom-tooltip-class {
    div {
        line-height: 30px !important;
        text-align: center !important;
    }
}

// هذا لتعدد الأسطر
.mat-tooltip-multiline {
  div {
    white-space: pre-line;
  }
}

















تعليقات

المشاركات الشائعة من هذه المدونة

ngx-extended-pdf-viewer

how to getting access token for https://fcm.googleapis.com/v1/projects/al-ayahya-co/messages:send for angular and backend nestjs

طريقة تفعيل زر Inline Keyboard في Telegram Bot