canvas云层动画js插件

Code:

Code using jQuery:

Full code example

                    <!-- html code -->
                    <!doctype html>
                    <html>
                    <head>
                    <title>Klouds Example</title>
                    <link href="your-style.css" rel="stylesheet">
                    </head>
                    <body>
                    <div id="myCanvasContainer">
                    <canvas id="myCanvas"></canvas>
                    </div>
                    <script src="klouds.min.js"></script>
                    <script src="your-script.js"></script>
                    </body>
                    </html>
            
                    // your-script.js
                    new Klouds({
                selector: '#myCanvas',
                layerCount: 5,
                speed: 1,
                cloudColor1: '#1ab3cc',
                cloudColor2: '#ffffff',
                bgColor: '#06680'
                    })
            
                    /* your-style.css */
                    
#myCanvasContainer {
                    width:100%;
                    height:240px;
                    }