CSS Gradient as background color for Layer

  • I don't know how to do it in xml, but using JavaScript in the plugin, you can do it like this:

    Code
    let t = document.createElement('div');
    t.id = 'test'
    t.innerHTML = 'this is Test layer';
    t.style.cssText = 'background: linear-gradient(45deg, #FF0000 0%, #00000000 100%); width:150px; height:25px;'
    plugin.sprite.appendChild(t);

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!