5
Staff need to place and animate a degrade as background of a font with a written text.
I need this gradient to be applied to the source (not behind the text) and to keep moving from left to right indefinitely. How I do this with CSS or Jquery?
The background has it in both image and CSS. Gradient in CSS:
background: #f44730; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y0NDczMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjI2JSIgc3RvcC1jb2xvcj0iI2Y3ZjAyZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iIzJkYmExZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijc2JSIgc3RvcC1jb2xvcj0iIzIzNzVkYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkMTExMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(left, #f44730 0%, #f7f02e 26%, #2dba1d 51%, #2375db 76%, #d11100 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#f44730), color-stop(26%,#f7f02e), color-stop(51%,#2dba1d), color-stop(76%,#2375db), color-stop(100%,#d11100)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #f44730 0%,#f7f02e 26%,#2dba1d 51%,#2375db 76%,#d11100 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #f44730 0%,#f7f02e 26%,#2dba1d 51%,#2375db 76%,#d11100 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #f44730 0%,#f7f02e 26%,#2dba1d 51%,#2375db 76%,#d11100 100%); /* IE10+ */
background: linear-gradient(to right, #f44730 0%,#f7f02e 26%,#2dba1d 51%,#2375db 76%,#d11100 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f44730', endColorstr='#d11100',GradientType=1 ); /* IE6-8 */
Check whether these answers to that question, they no longer help you.
– Fernando Leal
Look all worked out but I need the background to be inside the Font and not behind the letter. Type of time the letter color to be black will be a degrade. Thank you
– Joao Nivaldo
@Joaonivaldo you did not explain this in the question.
– Renan Gomes
Pardon I expressed myself badly at the beginning of the explanation.
– Joao Nivaldo
As a matter of curiosity, there is
-webkit-background-clip:text
that does just what it needs: Apply the color of background in the text. But this is not a standard value, it does not exist in the specification and was implemented only in browsers -Webkit-. I believe you will have to use Javascript even - see on Google Chrome - who knows someday become something standardized. ^^– Renan Gomes