css - 如何在 mat-menu 按钮中不换行?
问题描述
我有mat-menu
:
<mat-menu #menu="matMenu">
<button *ngFor="let doc of docs; let i = index" mat-menu-item>
{{ i + 1 }}. {{ doc.name }} // Here long text
</button>
</mat-menu>
如果文本这么长,如何将文本换行<button>
并删除点?
我努力了:white-space: nowrap
解决方案
您可以重置 css 属性:
white-space: normal;
overflow: visible;
text-overflow: clip;
推荐阅读
- apostrophe-cms - 如何在 ApostropheCMS 中设置网站图标
- scala - 查找在给定月份中花费最大金额的客户 ID
- python - 如何解密我知道它在 Python 中的模式的字符串?
- python - 如何在 Python 或 R 中绘制这种图表?
- python - numpy.array Boolean mix with int
- hiveql - 按 sql / hiveql 中的列中的值集分组
- python-3.x - Python-遍历多个文件以读入数据框
- java - 我的 AJAX 不会运行 SUCCESS 函数,但会执行我的控制器 JAVA
- aws-device-farm - 将图像上传或添加到 iOS 设备相机胶卷
- php - 从 laravel 检索数据到刀片