【发布时间】:2020-07-01 04:00:23
【问题描述】:
我有一个带有一些文本覆盖的图像作为菜单。但是,图像没有得到适当的边界半径,我不知道为什么。
我希望图像和叠加层具有像 border-radius: 8px; 这样的圆形边缘,但是我尝试过的所有方法都不起作用。我已经尝试放置!important 并在所有父元素上设置边框半径。
这是 stackblitz 中的代码链接。根据我的研究,这可能与 div 中的图像有关。
(顺便说一句,我使用的是 angular,但我已经简化了 html)
https://stackblitz.com/edit/ng-mat-beta-12-fzsfeh?embed=1&file=app/app.component.html
【问题讨论】:
-
minimal reproducible example 请在您的问题中提问
-
示例不工作。发布您可以在浏览器中看到的生成的 html