Draggable实现拖拽束缚效果代码

代码语言:html

所属分类:拖放

代码描述:Draggable实现拖拽束缚效果代码

代码标签: 束缚 效果

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

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

<head>

    <meta charset="UTF-8">


    <style>
        svg {
            overflow: visible;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
        }


        #back {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 90%;
            transform: translate(-50%,-50%);
            font-family: arial;
            color: rgba(0,0,0,0.1);
            font-size: 50px;
            font-size: 10vw;
            text-align: center;
            white-space: nowrap;
        }
    </style>


</head>

<body>
    <div id="back">
        All about My Life
    </div>
    <svg id="myLife" width="500px" height="500px" viewBox="0 0 500 500">
        <g id="I">
            <circle cy="20" fill="rgba(0,0,0,0.2)" r="73" /><circle fill="#d50027" r="80" /><circle cy="-5" fill="#ff002f" r="75" />
            <text text-anchor="middle" font-family="Verdana" alignment-baseline="middle" font-size="20" fill="white">LET ME GO</text>
        </g></svg>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/TweenMax.min.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/Draggable.1.20.3.js"></script>

    <script>
        /* a Pen by Diaco m.lotfollahi  : https://diacodesign.com */
        var C = 15, AX = [], AY = []; I = document.getElementById("I".........完整代码请登录后点击上方下载按钮下载查看

网友评论0