Last active
December 19, 2023 11:33
-
-
Save PechenkiUA/d2d08a14cb25728c5fda5ee973299462 to your computer and use it in GitHub Desktop.
gragon-liqpay #js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (){ | |
const _dragonElementWrap = document.createElement('div'); | |
_dragonElementWrap.style.overflow = 'hidden'; | |
_dragonElementWrap.style.width = '100%'; | |
_dragonElementWrap.style.position = 'fixed'; | |
_dragonElementWrap.style.bottom = '0px'; | |
_dragonElementWrap.style.left = '0px'; | |
_dragonElementWrap.style.right = '0px'; | |
_dragonElementWrap.style.zIndex= '9999'; | |
const _dragonElement = document.createElement('div'); | |
_dragonElement.style.width = '188px'; | |
_dragonElement.style.height = '160px'; | |
_dragonElement.style.bottom = '0px'; | |
_dragonElement.style.left = '0%'; | |
_dragonElement.style.position = 'relative'; | |
_dragonElement.style.transition = '.3s all'; | |
_dragonElement.style.backgroundImage = 'url(https://static.liqpay.ua/adminbusiness/3ca4ecffe3930543829fda3b3dfc1190.svg)'; | |
_dragonElementWrap.append(_dragonElement); | |
document.body.append(_dragonElementWrap); | |
let startLeft = 0; | |
let counter = setInterval(()=>{ | |
_dragonElement.style.left = `${startLeft}%`; | |
if (startLeft === 100){ | |
clearInterval(counter); | |
_dragonElement.remove(); | |
} | |
startLeft++; | |
},100) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment