繁体   English   中英

Safari 13 中的 hover 过渡失去颜色,这是一个错误吗?

[英]Lost color on hover transition in Safari 13, is this a bug?

I found that under certain CSS conditions the color of a link will turn transparent on hover (and then remain transparent) in Safari 13 (which is the current version of Safari on older versions of macOS). 我想这是一个错误,因为它不会发生在 Safari 14 中。

这是触发此行为的 CSS 规则的组合:

:root {
    --my-color: color(display-p3 1 0 0);
}
* {
    box-sizing: inherit;
}
a {
    transition: all .15s linear;
    color: var(--my-color);
}
a:hover {
    text-decoration: none;
}

根据 Safari 13 中的 web 检查器,颜色将从color(display-p3 1 0 0)变为rgba(0, 0, 0, 0)

我创建了一个 CodePen,我想我的问题是; 有人可以在 Safari 13 中确认这种行为吗? https://codepen.io/aetles/pen/WNRWeya

不,这不是错误。 Safari 对 HTML 有一定的限制。

而不是color: var(--my-color)color: #COLOR

Safari 在处理 HTML、CSS 和 Z9E13B69D1D2DA927102ACAAAF7154 等 Google 帮助文件方面表现不佳。

如果没有,对不起,我没有答案。

暂无
暂无

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

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