gpt4 book ai didi

css - 渐变背景色 on::selection

转载 作者:技术小花猫 更新时间:2023-10-29 10:36:36 25 4
gpt4 key购买 nike

有没有办法在 CSS ::selection 中添加渐变颜色?


如果我使用这样的东西:

::selection {
background-image: -webkit-linear-gradient(left, #ee4037 0%, #eb297b 100%);
}

它不起作用。

最佳答案

没有。

根据 MDN

Only a small subset of CSS properties can be used in a rule using ::selection in its selector: color, background-color, cursor, outline, text-decoration, text-emphasis-color and text-shadow. Note that, in particular, background-image is ignored, like any other property.

关于css - 渐变背景色 on::selection,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33942675/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com