Skip to main content

NOTICE: On Friday Nov 6, Workspaces will be temporarily unavailable for maintenance.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Spencer Renfro
    PLUS
    Spencer Renfro
    Courses Plus Student 11,133 Points

    The animation in the teachers note: the hash in the browser's URL does not change when clicking the eat button.

    Posted June 26, 2022 8:19pm by Spencer Renfro
    Spencer Renfro
    Courses Plus Student 11,133 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • baderbouta
    baderbouta
    7,804 Points

    Doesnt ":root" kinda replaces some simple JS?

    Posted October 12, 2018 12:36pm by baderbouta
    baderbouta
    7,804 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Yosif Qassim
    Yosif Qassim
    6,367 Points

    i want to learn how to make the animation that is provided in the teachers notes

    Posted April 13, 2018 1:30pm by Yosif Qassim
    Yosif Qassim
    6,367 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • Andrew Husted
    Andrew Husted
    11,271 Points

    I want to change src property of image using :target.

    Posted November 8, 2017 6:21pm by Andrew Husted
    Andrew Husted
    11,271 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Presica Mathew
    PLUS
    Presica Mathew
    Courses Plus Student 2,752 Points

    What is the difference between * and :root functionalities?

    Posted September 5, 2017 11:15am by Presica Mathew
    Presica Mathew
    Courses Plus Student 2,752 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Mitchell Smit
    Mitchell Smit
    9,219 Points

    Workspace doesnt work

    Posted July 23, 2017 7:24pm by Mitchell Smit
    Mitchell Smit
    9,219 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    3 Answers

  • Nikica Maksimovski
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Nikica Maksimovski
    Full Stack JavaScript Techdegree Student 14,080 Points

    @keyframes meaning ?

    Posted July 11, 2017 11:01am by Nikica Maksimovski
    .a{fill-rule:evenodd;}techdegree
    Nikica Maksimovski
    Full Stack JavaScript Techdegree Student 14,080 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • Amber O'Rear
    Amber O'Rear
    7,791 Points

    The workspace has no HTML file, just a blank style sheet.

    Posted April 27, 2017 5:53pm by Amber O'Rear
    Amber O'Rear
    7,791 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    3 Answers

  • johnadi
    johnadi
    3,690 Points

    hi i remove my base.css. how to get this againplz help me

    Posted April 21, 2017 5:20am by johnadi
    johnadi
    3,690 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Benjamin Hedgepeth
    Benjamin Hedgepeth
    5,672 Points

    Applying background-color to :root vs body

    Posted March 30, 2016 8:25pm by Benjamin Hedgepeth
    Benjamin Hedgepeth
    5,672 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • YOUSSEF D
    PLUS
    YOUSSEF D
    Courses Plus Student 3,778 Points

    :target for hidden and show div

    Posted February 6, 2016 12:28am by YOUSSEF D
    YOUSSEF D
    Courses Plus Student 3,778 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • XIN FANG ZHONG
    XIN FANG ZHONG
    10,149 Points

    About the example CSS animate

    Posted December 8, 2015 3:30pm by XIN FANG ZHONG
    XIN FANG ZHONG
    10,149 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Diego Murray
    Diego Murray
    2,515 Points

    Can someone elaborate on the :target pseudo class and how this is used exactly?

    Posted August 12, 2015 5:10pm by Diego Murray
    Diego Murray
    2,515 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    3 Answers

  • Diego Murray
    Diego Murray
    2,515 Points

    Is there a reason why Guil choses to use an RGBA value here for the box-shadow?

    Posted August 12, 2015 4:21pm by Diego Murray
    Diego Murray
    2,515 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Rishit Shah
    Rishit Shah
    4,975 Points

    Difference between :focus and :target

    Posted August 5, 2015 4:19am by Rishit Shah
    Rishit Shah
    4,975 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • Jacob Bender
    Jacob Bender
    15,300 Points

    Combine :hover and :target to activate without clicking

    Posted July 14, 2015 5:12pm by Jacob Bender
    Jacob Bender
    15,300 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Elena Paraschiv
    Elena Paraschiv
    9,938 Points

    other examples of :target rule to better understand

    Posted June 28, 2015 10:33pm by Elena Paraschiv
    Elena Paraschiv
    9,938 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • Taokeen Cheung
    Taokeen Cheung
    10,606 Points

    #col-c:target {background: #eff1f2;} - Not changing. How do I fix?

    Posted June 15, 2015 11:08am by Taokeen Cheung
    Taokeen Cheung
    10,606 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Li Mbo
    Li Mbo
    5,096 Points

    what does :root actually do and for what do we need it?

    Posted June 1, 2015 10:14pm by Li Mbo
    Li Mbo
    5,096 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

  • Sandro Meschiari
    Sandro Meschiari
    18,418 Points

    Animation

    Posted April 9, 2015 4:31pm by Sandro Meschiari
    Sandro Meschiari
    18,418 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    2 Answers

  • Michael Rockett
    Michael Rockett
    40,365 Points

    When link is clicked, page moves down to the targets id

    Posted March 27, 2015 11:45pm by Michael Rockett
    Michael Rockett
    40,365 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :root and :target

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord