Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to add gradient color to text


/*create the gradient*/
    background-image: var(--buttonBg);// any color you want
    /* Set the background size and repeat Properties */
    background-size: 100%;
    background-repeat: repeat;
    /* Use the text as a mask for the background */
    /* Theis will show the gradient as a text color rather  element bg*/
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text;
    -moz-text-fill-color:transparent;
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #add #gradient #color #text
ADD COMMENT
Topic
Name
1+3 =