angular-material - Angular 11 Mat Select 更改选项高度打破了位置
问题描述
我有带有国家列表的垫子选择选项,类似于此处的州示例:https ://material.angular.io/components/select/overview#select-reset
is 默认包含以下css:
.mat-select-panel .mat-optgroup-label, .mat-select-panel .mat-option {
font-size: inherit;
line-height: 3em;
height: 3em;
}
我想改成height: 3em;
这样height: 4em;
:
.mat-select-panel .mat-optgroup-label, .mat-select-panel .mat-option {
height: 4em !important;
}
甚至添加填充中断:我假设 3em 是硬编码来计算位置的?
这会破坏所选选项,因为当我返回选择另一个选项时它不再可见。
如何在不破坏位置的情况下改变高度?
谢谢
解决方案
推荐阅读
- ios - 我想在我的应用程序中购买电子书。我可以通过 webview 付款而不使用应用内购买吗.. iTunes 商店是否批准了我的应用
- javascript - 非法调用方法分配
- c# - 在 ASP.NET Core 的外部 OAuth 身份验证提供程序中使用 Bearer 令牌
- vb.net - 如何使用 vb.net 在子目录结构中查找并打开最新的 txt 文件
- android - Android将PCM字节数组写入wav文件
- docker - 在使用 Paket 从项目构建的 Docker 映像中找不到 Microsoft.AspNetCore.App 2.2.7
- c - 如何将更改保存在 c 上的动态树上?
- javascript - 带有 CSS 变量冒泡的 JavaScript 鼠标位置剪辑路径效果
- docker - 具有撰写文件单节点和本地映像的 docker 服务
- python - 计算列中工资范围的平均值