svg+css实现表白玫瑰描边显示动画效果代码

代码语言:html

所属分类:表白

代码描述:svg+css实现表白玫瑰描边显示动画效果代码

代码标签: svg css 玫瑰 描边 显示 动画

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

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


<style>
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    body{
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgb(0, 0, 0);
    }
    svg{
          border: 1px solid rgba(233, 233, 233, 0.9);
          box-shadow: inset 0 0 15px rgba(233, 233, 233, 0.9);
          cursor: pointer;
          transition: all 1.5s;
    }
    .hua{
        fill: transparent;
        stroke: white;
        stroke-width: 5px;
       stroke-dasharray: 1235;
       stroke-dashoffset: 1235;
       transition: all 1.5s;

    }
    svg:hover{
        box-shadow: inset 0 0 15px rgba(233, 233, 233, 1),
        inset 0 0 20px rgba(233, 233, 233, 1);

    }
    svg:hover .hua{
        stroke-dashoffset: 0;
            fill: red;

        /* animation: move 2s linear forwards; */
    }
    /* @keyframes move{
        0%{
            stroke-dashoffset: 1230;
            fill: transparent;
        }
        50%{
            stroke-dashoffset: 0;
            fill: transparent;
        }
        100%{
            stroke-dashoffset: 0;
            fill: red;
        }
    } */
</style>
<body>
   
    <svg  viewBox="0 0 1024 1024"  width="300" height="300" >      
        <path  class="hua&quo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0