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 trial

CSS CSS Selectors Advanced Selectors :root and :target

Elena Paraschiv
Elena Paraschiv
9,938 Points

other examples of :target rule to better understand

Can you guys give other examples of how to use the :target rule? I want to understand it better.

1 Answer

here is a great blog post about the target pseudo class element:

https://css-tricks.com/on-target/

https://css-tricks.com/css-target-for-off-screen-designs/

so far as examples of the target element in action the first thing that comes to mind is the scroll to top button on some websites. Its generally on the lower hand side of the browser with an arrow, that is using the target element to make it easier for people to scroll up to the top of the page. I hope this helps.

not a Problem!