gsap实现爱心拖动滑竿slider效果代码

代码语言:html

所属分类:表单美化

代码描述:gsap实现爱心拖动滑竿slider效果代码

代码标签: 拖动 滑竿 slider 效果

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

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

<head>

    <meta charset="UTF-8">




    <style>
        body {
            background-color: #175676;
            overflow: hidden;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        body,
        html {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
        }

        svg {
            width: 100%;
            height: 100%;
            visibility: hidden;
            overflow: visible;
        }
    </style>


</head>

<body translate="no">
    <svg id="loveSliderSVG" viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet">
        <defs>


        </defs>
        <!-- <rect width="100%" height="100%"/> -->
        <line class="trackBg" x1="50" x2="750" y1="366" y2="366" stroke="#FFFCF9" stroke-linecap="round" stroke-linejoin="round" stroke-width="15" />
        <line class="trackMiddle" x1="50" x2="750" y1="366" y2="366" stroke="#2E6783" stroke-linecap="round" stroke-linejoin="round" stroke-width="6" opacity="1" />
        <line class="track" x1="50" x2="750" y1="366" y2="366" stroke="#ff595e" stroke-linecap="round" stroke-linejoin="round" stroke-width="6" />


        <g id="heartChat" class="heartChat">
            <path d="M115.44,92H81.15a8.32,8.32,0,0,0-5.9,2.45l-9.9,9.9a1,1,0,0,1-1.34,0l-9.9-9.9A8.35,8.35,0,0,0,48.2,92H13.91A10.44,10.44,0,0,1,3.5,81.6V13.91A10.45,10.45,0,0,1,13.91,3.5H115.44a10.44,10.44,0,0,1,10.41,10.41V81.6A10.43,10.43,0,0,1,115.44,92Z" fill="none" />
            <path d="M115.44,92H81.15a8.32,8.32,0,0,0-5.9,2.45l-9.9,9.9a1,1,0,0,1-1.34,0l-9.9-9.9A8.35,8.35,0,0,0,48.2,92H13.91A10.44,10.44,0,0,1,3.5,81.6V13.91A10.45,10.45,0,0,1,13.91,3.5H115.44a10.44,10.44,0,0,1,10.41,10.41V81.6A10.43,10.43,0,0,1,115.44,92Z" fill="none" stroke="#FFFCF9" stroke-miterlimit="10" stroke-width="5" />

            <mask id="heartFillMask">
                <rect class="heartFill" x="-54" y="72" width="237" height="91" fill="#FFF" />
            </mask>
            <path id="heartBg" d="M76.16,23a13.23,13.23,0,0,0-10.83,5.63,13.24,13.24,0,0,0-24.08,7.62c0,18.06,24.08,34.92,24.08,34.92S89.41,54.33,89.41,36.27A13.25,13.25,0,0,0,76.16,23Z" fill="#FFF" opacity="0.1" />
            <g mask="url(#heartFillMask)">
                <path id="XXpinkHeart" d="M76.16,23a13.23,13.23,0,0,0-10.83,5.63,13.24,13.24,0,0,0-24.08,7.62c0,18.06,24.08,34.92,24.08,34.92S89.41,54.33,89.41,36.27A13.25,13.25,0,0,0,76.16,23Z" fill="#ff595e" />
                <g id="shineGroup">
                    <path d=".........完整代码请登录后点击上方下载按钮下载查看

网友评论0