svg可改变背景色与沙发换色效果代码

代码语言:html

所属分类:布局界面

代码描述:svg可改变背景色与沙发换色效果代码,点击下面颜色按钮更换底色和沙发色

代码标签: 景色 沙发 换色 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.5.0.css">
    <style>
        body,
        html {
            height: 100%;
            display: flex;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            justify-content: center;
            align-items: center;
            font-family: arial;
            font-size: 12px;
        }

        body {
            background: linear-gradient(to right, #24243e, #302b63, #24243e);
        }
        body.fade {
            transition: 0.6s ease-in-out;
        }

        .colours {
            position: absolute;
            bottom: 1em;
            display: flex;
            flex-direction: column;
        }
        .colours__labels {
            display: flex;
            margin-bottom: 0.5em;
        }
        .colours__labels span {
            display: block;
            flex: 2;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 2px;
            font-size: 0.9em;
            color: white;
            text-shadow: 0px 0px 4px black;
        }
        .colours__labels span:first-child {
            flex: 1;
        }
        .colours__inputs {
            display: flex;
        }
        .colours .jscolor {
            display: block;
            border: 0;
            height: 40px;
            width: 60px;
            margin: 0;
            text-align: center;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
            cursor: pointer;
        }
        .colours .jscolor:first-child {
            border-radius: 6px 0 0 6px;
        }
        .couch {
            width: 1000px;
            height: 394px;
            transform: scale(0.66);
            position: relative;
            transition: 0.25s ease-in-out;
        }
        .couch__overlay, .couch__img {
            position: absolute;
            top: 0;
            left: 0;
        }
        .couch__overlay {
            z-index: 2;
            fill: #fcff4d;
            mix-blend-mode: multiply;
        }
        .couch__overlay.fade {
            transition: 0.6s ease-in-out;
        }

        .gen-random {
            background: #222;
            border: 0;
            color: white;
            border-radius: 0 6px 6px 0;
            border-left: 1px solid white;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
        }

@media (max-width: 940px) {
            .couch {
                transform: scale(0.5);
            }
        }
@media (max-width: 580px) {
            .couch {
                transform: scale(0.38);
            }
        }
@media (max-width: 460px) {
            .couch {
                transform: scale(0.4);
            }
        }
        .minorbrag {
            color: white;
            position: absolute;
            top: 2rem;
            right: 2rem;
            font-size: 1.25rem;
            display: inline-block;
        }
    </style>

</head>
<body>

    <div class="couch">
        <svg id="js-couch" class="couch__overlay" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink&.........完整代码请登录后点击上方下载按钮下载查看

网友评论0