html元素交集效果

代码语言:html

所属分类:布局界面

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <style>
:root {
        --venn-width-mult: 1;
    }

        body {
            background-color: #e8dea2;
        }

        main {
            width: calc(100% * var(--venn-width-mult));
            margin: 0 auto;
        }

        dt, dd {
            display: inline-block;
            margin: 0;
            vertical-align: middle;
        }

        /* Grid  */
        .Venn {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            grid-template-rows: repeat(2, calc(28.8vw * var(--venn-width-mult)));
        }

        .Venn .circle.one {
            grid-column-start: 1;
            grid-column-end: 4;
            grid-row-start: 1;
            grid-row-end: 3;
        }

        .Venn .circle.two {
            grid-column-start: 3;
            grid-column-end: 6;
            grid-row-start: 1;
            grid-row-end: 3;
        }

        .Venn .shape.onetwo {
            grid-column-start: 3;
            grid-column-end: 4;
            grid-row-start: 1;
            grid-row-end: 3;
        }

        /* Inner content */

        .Venn .circle,
        .Venn .shape {
            font-size: calc(2.5vw * var(--venn-width-mult));
            line-height: 1.25;
            display: flex;
            color: #fff;
        }

        .Venn .circle.one {
            background-color: #30d37b;
            mix-blend-mode: color-burn;
        }

        .Venn .circle.two {
            background-color: #e57100;
        }

        .Venn .circle {
            border-radius: 50%;
        }

        .Venn ul {
            display: flex;
            flex-direction: column;
            margin: auto;
            list-style: none;
            padding-left: 0;
        }
    </style>

</head>
<body translate=&q.........完整代码请登录后点击上方下载按钮下载查看

网友评论0