简体   繁体   English

如何去除角材料底片上烦人的点击覆盖?

[英]How to remove the annoying click overlay on bottom sheet in angular material?

Here is the problem : I added the bottomsheet from angular material in my angular 12 app.问题是:我在我的 angular 12 应用程序中添加了来自 angular 材料的底片。 It works well except on mobile phone where on each click it add a blue overlay which is annoying, I did a copy past from the material website... Does someone know what's up?它运行良好,除了在手机上,每次点击它都会添加一个令人讨厌的蓝色叠加层,我从材料网站复制过去......有人知道发生了什么吗?

Side note, I did add primeng, maybe is primeng the problem?旁注,我确实添加了primeng,也许是primeng的问题?

Here an animated pic for reference (imgur) Click to see the picture on imgur这里有一张动画图片供参考(imgur)点击查看imgur上的图片

Try adding this to scss or css of the element.尝试将此添加到元素的 scss 或 css 中。

-webkit-tap-highlight-color: transparent;

or或者

-webkit-tap-highlight-color: rgba(0,0,0,0);

Add this globally if you need如果需要,全局添加

* {
-webkit-tap-highlight-color: transparent;
}

For some versions, This or a combination with above are gonna work.对于某些版本,这或与上述的组合会起作用。

:focus {
    outline: none!important; /* no outline - for most browsers */
    box-shadow: none; /* no box shadow - for some browsers or if you are using Bootstrap */
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM