js实现四色托盘背景效果代码

代码语言:html

所属分类:背景

代码描述:js实现四色托盘背景效果代码

代码标签: 托盘 背景 效果

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

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">




    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        .scene {
            width: 100vw;
            height: 100vh;
        }
    </style>




</head>

<body >
    <svg class="scene" id="illustration" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" aria-labelledby="svgTitle svgDesc" role="img">
        <title id="svgTitle">A generative illustration</title>
        <desc id="svgDesc">Click on the image to redraw it!</desc>
    </svg>


    <script>
        const settings = {
            colors: {
                decor: ["#432ee6",
                    "#e62e74",
                    "#d0e62e",
                    "#2ee69f"],
                main: ["#dddddd",
                    "#222222"]
            },
            decor: {
                count: 25,
                minWidth: 1,
                maxWidth: 2,
               .........完整代码请登录后点击上方下载按钮下载查看

网友评论0