JSFiddle - React, Tailwind, and code Playground
by ghazal
HTML
<div id="wrap">
<div id="top-bar"></div>
<div id="moo-bar" style=""></div>
</div>
CSS
#wrap { width:550px; margin:0 auto; }
#top-bar { background:black; width:550px; height:50px; position:absolute; z-index:9999;top:-20px}
#moo-bar { background:#0d203e; width:450px; height:350px; position:absolute; z-index:9; left:70px;top:-305px; border-bottom-left-radius:10px; border-bottom-right-radius:10px; }
JavaScript
window.addEvent('domready', function() {
$('moo-bar').setStyle('top','-305').set('morph', { duration: 400 } );
$('moo-bar').addEvents({
'mouseenter': function(e) { e.stop();
this.morph( { 'top': '-1' } );
},
'mouseleave': function(e) { e.stop();
this.morph( { 'top': '-305' } );
}
});
// $('moo-bar').tween('top', '-305');
// $('moo-bar').addEvent('click', function(){
// $(this).tween('top', '-1');
// });
});