fix transition

This commit is contained in:
Tankred Hase 2013-12-04 11:18:31 +01:00
parent 6f1c59f1fe
commit c41eb1337f
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ define(function(require) {
var width = elm[0].offsetWidth;
var height = elm[0].offsetHeight;
popover[0].style.transition = 'opacity 0.4s linear';
popover[0].style.top = (top + height / 2 - popover[0].offsetHeight / 2) + 'px';
popover[0].style.left = (left + width) + 'px';
popover[0].style.opacity = '1';
@ -40,7 +41,10 @@ define(function(require) {
});
elm.on('mouseout', function() {
popover[0].style.transition = 'opacity 0.4s linear, top 0.4s step-end, left 0.4s step-end';
popover[0].style.opacity = '0';
popover[0].style.top = '-9999px';
popover[0].style.left = '-9999px';
});
};
});

View File

@ -19,7 +19,6 @@
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
white-space: normal;
opacity: 0;
transition: opacity 0.4s;
&.top {
margin-top: -10px;