Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialchihiro
5,271 PointsI'm having trouble understanding why my answer to the SVG hover quiz is incorrect.
Hello. I'm currently stuck on this test and
I can't figure out why my answer is incorrect.
Could someone please explain it to me?
Thank you.
<!DOCTYPE html>
<html>
<head>
<title>Animating SVG with CSS</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="60 60 240 240">
<g>
<circle class="star-bg" fill="#40adcf" stroke="#fff" stroke-width="6" cx="180" cy="180" r="108.3"/>
<path class="star" fill="#fff" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M180 107.8l16.9 52.1h54.8l-44.3 32.2 16.9 52.1-44.3-32.2-44.3 32.2 16.9-52.1-44.3-32.2h54.8z"/>
</g>
</svg>
</body>
</html>
/* Complete the challenge by writing CSS below */
.star-bg:hover {
fill: steelblue;
}
1 Answer
Steven Parker
231,265 PointsIt looks like you've added code for task 3, but the code for task 2 seems to be missing. Remember the advice given in the challenge that says "Important: In each task of this code challenge, the code you write should be added to the code from the previous task."
The instructions for task 2 were "In style.css, create a new rule that targets .star-bg. Add a 1s transition for the fill property."
chihiro
5,271 Pointschihiro
5,271 PointsHello! Thank you so much for your answer and it helped! I appreciate it.