gpt4 book ai didi

html - 幻灯片背景颜色过渡

转载 作者:行者123 更新时间:2023-11-28 09:21:39 24 4
gpt4 key购买 nike

我在 stackoverflow 的一个线程中找到了这个例子。

<a href="#">aosgibmoa bnocibnas</a>

a{
display:inline-block;
background:#fff;
position:relative;
padding:2px 5px;

background:-webkit-gradient(linear, left top, right top, color-stop(0.5, #fff), color-stop(0.5, #000));
background-size:200% 100%;
background-position:0 0;
-webkit-transition:background-position .3s ease-out;
}

a:hover{
background-position:100% 0;
}

http://jsfiddle.net/nsfxE/1/

但我不确定如何将 -webkit-gradient 更改为其他供应商前缀和正常的标准前缀。

我想确保它在某种程度上与现代的跨浏览器兼容。

最佳答案

background-image: -webkit-gradient(linear, left top, right top, color-stop(0.5, #fff), color-stop(0.5, #000));
background-image: -moz-linear-gradient(linear, left top, right top, color-stop(0.5, #fff), color-stop(0.5, #000));
background-image: -o-linear-gradient(linear, left top, right top, color-stop(0.5, #fff), color-stop(0.5, #000));
background-image: linear-gradient(linear, left top, right top, color-stop(0.5, #fff), color-stop(0.5, #000));

希望这就是你想要的。

关于html - 幻灯片背景颜色过渡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26075410/

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