From a9092ad6a1b902bb87a52e5ed91a85d09b24376a Mon Sep 17 00:00:00 2001 From: Mestima Date: Wed, 1 Jun 2022 00:54:58 +0300 Subject: [PATCH] initial commit --- index.html | 27 +++++++++++++++++++++++++++ runAway.js | 19 +++++++++++++++++++ style.css | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 index.html create mode 100644 runAway.js create mode 100644 style.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..5af85c9 --- /dev/null +++ b/index.html @@ -0,0 +1,27 @@ + + + + Welcome to nginx! + + + +

Welcome to

nginx

!

+

If you see this page, the nginx web server is successfully installed and + working. Further configuration is required.

+ +

For online documentation and support please refer to + nginx.org.
+ Commercial support is available at + nginx.com.

+ +

Thank you for using nginx.

+ + + + + diff --git a/runAway.js b/runAway.js new file mode 100644 index 0000000..9eb6ae9 --- /dev/null +++ b/runAway.js @@ -0,0 +1,19 @@ +const rnd = (min, max) => { + const r = min + Math.random() * (min - max + 1); + return Math.floor(r); +} + +const initRunning = (obj) => { + obj.style.position = 'absolute'; + obj.style.transition = '0.09s'; + obj.addEventListener('mouseover', () => { + obj.style.left = `${rnd(30, 50)}%`; + obj.style.top = `${rnd(30, 50)}%`; + }); +}; + +const initColor = (obj) => { + setInterval(() => { + obj.style.color = '#'+(0x1000000+(Math.random())*0xffffff).toString(16).substr(1,6); + }, 100); +}; diff --git a/style.css b/style.css new file mode 100644 index 0000000..c77b0ff --- /dev/null +++ b/style.css @@ -0,0 +1,45 @@ +body { + width: 35em; + margin: 0 auto; + font-family: Tahoma, Verdana, Arial, sans-serif; +} + +.inline { + display: inline-block; +} + +@-webkit-keyframes rotating { + from { + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes rotating { + from { + -ms-transform: rotate(0deg); + -moz-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -ms-transform: rotate(360deg); + -moz-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -o-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.rotating { + -webkit-animation: rotating 2s linear infinite; + -moz-animation: rotating 2s linear infinite; + -ms-animation: rotating 2s linear infinite; + -o-animation: rotating 2s linear infinite; + animation: rotating 2s linear infinite; +} \ No newline at end of file