svg+js实现红色水滴柱子动画效果代码

代码语言:html

所属分类:动画

代码描述:svg+js实现红色水滴柱子动画效果代码

代码标签: css 水滴 柱子 动画 红色

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

<!DOCTYPE html>

<html lang="en">

<head>

   
<meta charset="UTF-8">





   
<style>
       
:root {
         
--one:#111;
         
--two:#c00;
       
}
       
        body
{
         
background-color: var(--one);
         
margin: 0;
       
}
       
        svg
{
         
height: 100vh;
         
width: 100%;
         
display: block;
       
}
       
        rect
[y="0"] {
         
fill: var(--two);
       
}
       
        rect
[y="100"] {
         
fill: var(--one);
       
}
       
        path
{
         
transition: 3s cubic-bezier(0.3, 0.2, 0.1, 1.2);
         
fill: none;
         
stroke: var(--two);
         
stroke-width: 10;
         
stroke-linejoin: round;
         
stroke-linecap: round;
       
}
       
       
#floor {
         
stroke: var(--one);
       
}
   
</style>



</head>


<body>
    <svg viewBox="-10 -5 220 200" preserveAspectRatio="xMidYMin meet" ; style=.........完整代码请登录后点击上方下载按钮下载查看

网友评论0