-
Notifications
You must be signed in to change notification settings - Fork 0
/
tip.min.js
5 lines (5 loc) · 1.21 KB
/
tip.min.js
1
2
3
4
5
/**
* tip.js v1.0
* Created by lifanko on 2017/6/8.
* https://github.com/lifankohome/tip-js
*/document.write("\x3cdiv id\x3d'tip-lifankohome'\x3e\x3c/div\x3e");function tip(e,h,k,f,g){var c=e.length+4,a=document.getElementById("tip-lifankohome");a.style.textAlign="center";a.style.position="fixed";a.style.top=h;a.style.zIndex=f?f:0;var d=g?g:!1;d?(a.style.left="",a.style.right="0",a.innerHTML="\x3cspan id\x3d'span-tip-js' style\x3d'color: whitesmoke;background-color: #3458b0;display: inline-block;padding: 10px 30px;border-bottom-left-radius: 19px;border-top-left-radius: 19px;transition: all 0.5s 0s'\x3e"+e+"\x3c/span\x3e"):(a.style.right="",a.style.left="0",a.innerHTML="\x3cspan id\x3d'span-tip-js' style\x3d'color: whitesmoke;background-color: #3458b0;display: inline-block;padding: 10px 30px;border-bottom-right-radius: 19px;border-top-right-radius: 19px;transition: all 0.5s 0s'\x3e"+e+"\x3c/span\x3e");var b=document.getElementById("span-tip-js");d?b.style.marginRight="-"+c+"pc":b.style.marginLeft="-"+c+"pc";var l=setInterval(function(){d?b.style.marginRight="0":b.style.marginLeft="0";clearInterval(l)},10),m=setInterval(function(){d?b.style.marginRight="-"+c+"pc":b.style.marginLeft="-"+c+"pc";clearInterval(m)},10+k)};