in animation

This commit is contained in:
troy 2022-11-08 18:24:16 +01:00
parent 8e56887b7a
commit 1764bbaa24
2 changed files with 34 additions and 3 deletions

View File

@ -6,9 +6,33 @@ frontlog {
}
flogelem {
display: log;
display:block;
border-width: 1px;
border-style: solid;
overflow: hidden;
max-height: 0;
margin-bottom: 0;
padding: 0;
opacity: 0;
-webkit-transition: max-height 3s, margin-bottom 3s, padding 3s,opacity 3s;
-moz-transition: max-height 3s, margin-bottom 3s, padding 3s,opacity 3s;
transition: max-height 3s, margin-bottom 3s, padding 3s,opacity 3s;
}
.flshow {
max-height: 100px!important;
margin-bottom: 1em;
padding: 4px;
border-radius: 8px;
opacity: 1;
}
fltitle {
display: block;
font-size: 120%;
}
flogelem img {
float: left;
width: 25px;
}

View File

@ -30,7 +30,7 @@ let frontlogPipe = function(title,icon,msg,col, time) {
{
let ch = 'abcdefghijklmnopqrstuvwxyz0123456789';
let chl = ch.length;
for ( let i = 0; i < length; i++ ) {
for ( let i = 0; i < 16; i++ ) {
elemid += ch.charAt(Math.floor(Math.random() * chl));
}
}
@ -50,10 +50,17 @@ let frontlogPipe = function(title,icon,msg,col, time) {
elem.style = 'border-color: '+col+';';
elem.addEventListener('click',function(ev){
frontlogVanish(ev.target);
let tg = ev.target;
if(tg.tagName.toLowerCase() != 'flogelem') {
tg = ev.target.parentNode;
}
frontlogVanish(tg);
});
setTimeout(function(){
frontlogVanish(elem);
},time*1000)
frontlog.appendChild(elem);
setTimeout(function(){
elem.classList.add('flshow');
},10);
}