We have learned that css animation/transition
does not work with display: block
&display: none
; therefore, I attempted to use
someDom.style.transition = '0.3s'
someDom.style.display='block'
someDom.style.opacity=1
to create an animation like a fadeIn
.
Unfortunately, it still did not work as desired because it ran too quickly.
I am aware that using setTimeout
could solve this issue, but I am concerned about it becoming an asynchronous event due to the JavaScript event loop.