javascript - How to use js or css3 to achieve the dynamic effect of element borders, as shown in the figure?
仅有的幸福
仅有的幸福 2017-06-30 09:57:39
0
2
1210

The aperture can be one, just like the avatar frame of King of Glory, how can it be realized?

仅有的幸福
仅有的幸福

reply all(2)
洪涛
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .boxA {
            position: relative;
            width: 200px;
            height: 200px;
            border:2px solid yellow;
        }
        .boxB {
            position: absolute;
            width: 10px;
            height: 10px;
            top: 0;
            left: 0;
            background-color: pink;
            animation: mymove linear 5s infinite;
        }
        @keyframes mymove {
            25% {
                transform: translate(190px,0px);
            }
            50% {
                transform: translate(190px,190px);
            }
            75% {
                transform: translate(0px,190px);
            }
            100% {
                transform: translate(0px,0px);
            }
        }
    </style>
</head>
<body>
    <p class="boxA">
        <p class="boxB"></p>
    </p>
</body>
</html>
世界只因有你

Use css3 animation properties and transform

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template