Search code examples
cssframerjs

Is there a way to add webkit specific styles on a layer?


For example can I add -webkit-backdrop-filter: saturate(1.8) blur(20px); on a Layer to quickly simulate background blur?


Solution

  • Yes, you can use a Layer's style property to set custom css styles. Example:

    layerB = new Layer
        image: Utils.randomImage()
    
    layerA = new Layer
    
    layerA.style["-webkit-backdrop-filter"] = "saturate(1.8) blur(20px)"