gpt4 book ai didi

html - 文本输入上的 CSS 渐变

转载 作者:搜寻专家 更新时间:2023-10-31 21:52:17 25 4
gpt4 key购买 nike

是否可以使 <input> 的文本颜色梯度?我为静态文本找到了这个解决方案,但它不适用于输入:

h1 {
font-size: 72px;
background: -webkit-linear-gradient(to right, rgb(66, 251, 227), rgb(43, 43,
255));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

最佳答案

是的,这是可能的,请试试这个

background-image: linear-gradient(bottom, #f00 5%, #000 100%);
background-image: -o-linear-gradient(bottom, #f00 5%, #000 100%);
background-image: -moz-linear-gradient(bottom, #f00 5%, #000 100%);
background-image: -webkit-linear-gradient(bottom, #f00 5%, #000 100%);
background-image: -ms-linear-gradient(bottom, #f00 5%, #000 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.05, #f00),
color-stop(1, #000)
);

关于html - 文本输入上的 CSS 渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51692618/

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