fixed several bugs in navbar element css animation