From d38293920c932c1c46ccb777c640d669d4c06fd1 Mon Sep 17 00:00:00 2001 From: Ccccadyrov Date: Tue, 29 Nov 2022 08:59:13 +1000 Subject: [PATCH] CASINOHACK --- index.html | 10 ++++++-- script/js.js | 39 +++++++++++++++++++++++++++++ styles/style.css | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b7dd7cc..ac1c444 100644 --- a/index.html +++ b/index.html @@ -60,6 +60,12 @@

ловим текст сюда

- - + +
+

ВЗЛАМЫВАЕМ КАЗИНО

+

+
0
+ +
+ \ No newline at end of file diff --git a/script/js.js b/script/js.js index e69de29..c50a8f3 100644 --- a/script/js.js +++ b/script/js.js @@ -0,0 +1,39 @@ +const button1 = document.querySelector('.getmoney'); +const succesBar = document.querySelector('.casino__success'); +const overlay = document.querySelector('.casino'); +const perc = document.querySelector('.percent'); +const cash = document.querySelector('.cash'); +cash.textContent="НАЧИНАЕМ" +const hidder = function() { + overlay.classList.add('hidden'); +} +button1.addEventListener('click', hidder) + +let i =0; +const plus = function () { + i=i+1; + succesBar.setAttribute('style', `width:${i}%`) + if (i>100) {i=100} + perc.textContent=`${i}%` + cash.textContent=`Выкачано ${3792300/100*i}$ из 3792300$` +} +let timer = setInterval(plus, 500); + + +// const progressBar = function () { +// for (let k=0; k<=100; k++) +// {succesBar.setAttribute('style', `width:${k}%`)}; +// } + +// setTimeout(()=>{for (let k=0; k<=100; k=k+1) {succesBar.setAttribute('style', `width:${k}%`)}}, 1000) +// const test = function(i) { +// succesBar.setAttribute('style', `width:${i}%`) +// } + +// const progressBar = function (i) { + +// for (i; i<=100; i++) { +// setInterval(test, 1000); +// } +// } +// progressBar(0) \ No newline at end of file diff --git a/styles/style.css b/styles/style.css index d7169ee..ba5b544 100644 --- a/styles/style.css +++ b/styles/style.css @@ -131,4 +131,69 @@ ul { margin-left: auto; margin-right: auto; text-align: center; +} +.casino { + position: absolute; + right: 35%; + top: 15%; + width: 550px; + height: 350px; + background-color: #636262; + border-radius: 15px; + border: 3px solid white; + padding-bottom: 10px; +} +.casino_text { + text-align: center; + font-size: 22px; + font-weight: 700; +} +.casino_bar { + width: 450px; + height: 30px; + background-color: white; + margin-left: auto; + margin-right: auto; + margin-top: 90px; +} +.casino__success {background-color: greenyellow; +width: 0%; +height: 100%; +} +.getmoney { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 70px; + width: 200px; + height: 50px; + border-radius: 5px; + border: none; + background-color: black; + color: white; + font-size: 20px; +} +.getmoney:hover { + background-color: rgba(0, 0, 0, 0.685); +} +.hidden { + display: none; +} +.percent { + left: 50%; + text-align: center; + position: absolute; + display: block; + font-weight: 600; + font-size: 25px; +} +.cash { + font-weight: 500; + text-align: center; + width: 250px; + margin-left: auto; + margin-right: auto; + background-color: #afacac; + border-radius: 10px; + padding: 10px; } \ No newline at end of file