starback实现canvas下雨背景效果代码

代码语言:html

所属分类:背景

代码描述:starback实现canvas下雨背景效果代码

代码标签: 下雨 背景 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <style>
        html, * {
            font-family: 'Inter';
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #222;
            color: #fff;
            line-height: 1.6;
            height: 100vh;
            width: 100%;
            overflow: hidden;
        }

        .lead {
            font-size: 1.5rem;
            font-weight: 300;
        }

        .container {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            width: 100%;
            height: 100%;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        #canvas {
            -we.........完整代码请登录后点击上方下载按钮下载查看

网友评论0