Trying to animate the transparency of a text using -webkit-text-fill-color
a {
color: #fff;
-webkit-text-fill-color: rgba(255,255,255,0);
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: #fff;
-webkit-text-stroke: 2px white;
-webkit-transition: all .5s ease-out;
-moz-transition: all .5s ease-out;
-o-transition: all .5s ease-out;
transition: all .5s ease-out;
}
a:hover {
-webkit-text-fill-color: rgba(255,255,255,1);
}
I cant set the color to transparent because of compatibility issues of -webkit-text-fill-color and -webkit-text-stroke on IE.
答案 0 :(得分:0)
Sorry I don't have IE browser to test it on my mac, Please try this code
question.js:20 Uncaught SyntaxError: Unexpected token :
jquery.min.js:2 Uncaught Error: [$injector:modulerr]
http://errors.angularjs.org/1.6.4/$injector/modulerr?.....
at angular.js:38
at angular.js:4920
at q (angular.js:403)
at g (angular.js:4880)
at eb (angular.js:4802)
at c (angular.js:1914)
at Sc (angular.js:1935)
at ue (angular.js:1820)
at HTMLDocument.<anonymous> (angular.js:33367)
at j (jquery.min.js:2)
a {
color: #d5d5d5;
-webkit-text-fill-color: rgba(225,255,255,0);
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: #d5d5d5;
-webkit-text-stroke: 2px #d5d5d5;
-webkit-transition: all .5s ease-out;
-moz-transition: all .5s ease-out; /*gecko*/
-ms-transition: all .5s ease-out; /*IE10*/
-o-transition: all .5s ease-out; /*opera 11.10+*/
-pie-transition: all .5s ease-out; /*PIE*/
transition: all .5s ease-out;
}
a:hover {
color: #000;
-webkit-text-fill-color: rgba(255,255,255,1);
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: #000;
-moz-transition: all .5s ease-out; /*gecko*/
-ms-transition: all .5s ease-out; /*IE10*/
-o-transition: all .5s ease-out; /*opera 11.10+*/
-pie-transition: all .5s ease-out; /*PIE*/
transition: all .5s ease-out;
}