in animation
This commit is contained in:
parent
8e56887b7a
commit
1764bbaa24
26
frontlog.css
26
frontlog.css
@ -6,9 +6,33 @@ frontlog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
flogelem {
|
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 {
|
flogelem img {
|
||||||
|
float: left;
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
11
frontlog.js
11
frontlog.js
@ -30,7 +30,7 @@ let frontlogPipe = function(title,icon,msg,col, time) {
|
|||||||
{
|
{
|
||||||
let ch = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
let ch = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
let chl = ch.length;
|
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));
|
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.style = 'border-color: '+col+';';
|
||||||
elem.addEventListener('click',function(ev){
|
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(){
|
setTimeout(function(){
|
||||||
frontlogVanish(elem);
|
frontlogVanish(elem);
|
||||||
},time*1000)
|
},time*1000)
|
||||||
frontlog.appendChild(elem);
|
frontlog.appendChild(elem);
|
||||||
|
setTimeout(function(){
|
||||||
|
elem.classList.add('flshow');
|
||||||
|
},10);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user