Issue
Is it possible to set a linear gradient as a property value? I only know how to a hex value to the property, but how would you do the gradient equivalent of a CSS value in a JavaScript property value?
CSS
background: linear-gradient(180deg, #FAF9FA 0%, #F2F5FE 65.75%);
JavaScript to add a gradient to the background property.
this.opts = {
background: 0x000000,
fill: 0xffffff,
...options,
};
Solution
Have you tried to implement it like this?
this.opts = {
background: 'linear-gradient(180deg, #FAF9FA 0%, #F2F5FE 65.75%)',
...options,
};
Answered By - Nokkond
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.