I need some element (with position: fixed) to slide on the right side of the screen, stay there for a while and hide again on the right. I do not know the width, which makes it difficult to achieve. I have done this with jQuery before, but I would like to use pure CSS. Is it possible? I am not against using a third-party solution.
Here is my jQuery code:
$("element")
.css("right", -$("element").outerWidth() + "px")
.animate({right: 0}, 800)
.delay(3000)
.animate({right: -$("element").outerWidth() + "px"}, 800);
source
share