d3泡泡球生成动画效果

代码语言:html

所属分类:动画

代码描述:d3泡泡球生成动画效果

代码标签: 生成 动画 效果

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


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

<style>
* {
    box-sizing: border-box;
}

body,
html {
    height: 100%;
}

body {
    margin: 0;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    font-size: 16px;
}

.bubbles {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    touch-action: manipulation;
    width: auto;
    height: auto;
}

.bubble {
    position: absolute;
    background-color: var(--color);
    border: 4px solid var(--color);
    border-radius: calc(var(--radius) * 1px);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0);
    color: rgba(52, 73, 94, 0.75);
    cursor: pointer;
    font-size: 3rem;
    font-weight: lighter;
    outline: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transform: translate(-50%, -50%) translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(var(--scale));
    transition: box-shadow 200ms;
    width: calc(var(--radius) * 2px);
    height: calc(var(--radius) * 2px);
}

.bubble--active {
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.9);
}
</style>

</head>
<body translate="no">
<section class="bubbles"></section>

<script type="text/javascript" .........完整代码请登录后点击上方下载按钮下载查看

网友评论0