作者:王碧婷568473 | 来源:互联网 | 2023-05-18 01:44
Imhavingtroublesdoingatransitionfromgrayscaletocolored,itworksinchrome,butthatisit
I'm having troubles doing a transition from grayscale to colored, it works in chrome, but that is it.
我在从灰度转换为彩色时遇到麻烦,它在chrome中工作,但就是这样。
Here is the HTML:
这是HTML:
Here is the CSS:
这是CSS:
#post{
padding:0;
margin:0 auto;
margin-bottom:25px;
border:solid 1px #000;
height:150px;
width:750px;
display:block;
filter: url("data:image/svg+xml;utf8,#grayscale");
filter: gray alpha(opacity=50);
-webkit-filter: grayscale(50%);
-webkit-transition: 0.3s all ease;
-o-transition: 0.3s all ease;
-moz-transition: 0.3s all ease;
transition: 0.3s all ease;
-webkit-backface-visibility: hidden;
}
#post:hover{
filter: none;
-webkit-filter: grayscale(0%);
}
Thanks for any help, it's appreciated.
感谢您的帮助,非常感谢。
2 个解决方案