Giter Site home page Giter Site logo

Welcome to Noflowerzzk

I have nothing to say, so just relish my codes

The following's readme code:

# **Welcome to Noflowerzzk**

### I have nothing to say, so just _relish_ my codes

The following's readme code:

And the blog page's code:

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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>解压小球(有彩蛋)</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #eed9eba9;
        }

        #a {
            height: 200px;
            width: 200px;
            background-color: red;
            position: absolute;
            transition-duration: 0.4s, 0.4s, 2s, 2s, 0.4s, 0.4s;
            transition-delay: 0s, 0s, 5s, 5s, 0s, 0s;
            transition-property: background-color, border-radius, height, width, top, left;
            transition-timing-function: ease-out;
            border-radius: 25%;
        }
    </style>
</head>

<body>
    <div id="a">

    </div>
    <script>
        var div_a = document.getElementById('a');
        document.getElementById('a').addEventListener('touchmove', function (e) {
            console.log('touch move');

            const e_x = e.targetTouches[0].clientX
            const e_y = e.targetTouches[0].clientY

            const h = window.getComputedStyle(div_a).height.slice(0,
                window.getComputedStyle(div_a).height.lastIndexOf('px'))
            const w = window.getComputedStyle(div_a).width.slice(0,
                window.getComputedStyle(div_a).width.lastIndexOf('px'))


            // div_a.style.transform = `translate(${e_x - 100}px, ${e_y - 100}px)`;

            div_a.style.top = `${e_y - Number(h) / 2}px`
            div_a.style.left = `${e_x - Number(w) / 2}px`

            // div_a.style.top = `${e_y - 100}px`
            // div_a.style.left = `${e_x - 100}px`


            e.preventDefault();

            // div_a.style.transitionProperty = 'borderRadius';
            // div_a.style.transitionDuration = '5s';
            // div_a.style.borderRadius = '50%';
            // div_a.classList.add('b');


            // let x = document.createElement("audio");
            // x.setAttribute("src", `./video/${parseInt(Math.random() * 26, 10) + 1}.mp3`);
            // // setInterval(() => x.setAttribute("autoplay", "autoplay"), 500);
            // x.setAttribute("autoplay", "autoplay")
        })

        document.getElementById('a').addEventListener('touchstart', function (e) {
            // div_a.style.transitionDuration = '0.5s';
            div_a.style.backgroundColor = 'blue';

            div_a.style.borderRadius = '50%';

            div_a.style.height = '400px';
            div_a.style.width = '400px'

            div_a.style.transitionDelay = '0s,0s,5s,5s,0s,0s';

        })

        document.getElementById('a').addEventListener('touchend', function (e) {
            // div_a.style.transitionDuration = '0.5s';
            div_a.style.backgroundColor = 'red';

            div_a.style.borderRadius = '25%';

            div_a.style.height = '200px';
            div_a.style.width = '200px';


            div_a.style.transitionDelay = '0s';
        })


    </script>
</body>

</html>

No flower's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.