canvas可交互液态文本悬浮效果代码

代码语言:html

所属分类:悬停

代码描述:canvas可交互液态文本悬浮效果代码,文字像水滴一样,鼠标悬浮还会移动。

代码标签: canvas 交互 液态 文本 悬浮

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    body {
        overflow: hidden;
        background: #ffaaaa;
    }
    #canvas1 {
        position: absolute;
        width: 1200px;
        heigth: 600px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        filter: url("#goo");
        border: 1px solid white;
    }
footer, article {
  font-family: monospace;
  position: absolute;
  width: 100%;
  color: white;
  font-size: 15px;
  text-shadow: 1px 1px 1px #737373; 
  background: rgba(255,255,255,0.4);
}
footer {
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  height: 30px;
  line-height: 30px;
  padding-right: 20px;
}
footer a{
  color: white;
}
article {
  top: 10px;
  z-index: 100;
  width: 50%;
  max-width: 350px;
  font-size: 15px;
  color: white;
  padding: 20px;
  border-radius: 0 0 5px 0;
}
</style>

</head>
<body>
<!-- partial:index.partial.html -->
<canvas id="canvas1"></canvas>

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
    <defs>
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0