This was an interview question I was asked from Amazon. The question is to use HTML and css only to apply some css to the first n elements when hovering the nth element. i.e. You have 5 grey stars on the page, and when you hover the 4th star, the first 4 stars change to yellow, just like the rating UI on Amazon.
Viết câu trả lời