I need help with a question that has 4 options on a website. The scoreboard is located at the top-right corner of the page.
<div id="score" style="position:fixed;top:0;right:0;">
<p><b>Score:</b>1234</p>
</div>
When the user selects the correct answer on the first try, I want to display a fading text +10
in the center of the screen, which then moves to the top-right corner and adds 10 points to the score.
Although I have the logic for updating the score figured out, I'm struggling with the CSS aspect. I need assistance with adding the fade-in effect to the text "+10" (possibly using z-index) and animating it to the top-right corner. Can someone provide me with a code snippet or tutorial?
I consider myself an intermediate CSS user but cannot seem to find the right keywords to achieve the desired animation through online search engines. Any help would be greatly appreciated.