Length 6:53Stop using JS for things that CSS can solve
About this video
Shows how CSS pseudo-classes such as :empty, :target and :only-child can handle interface behaviour that is often coded in JavaScript. It suits front-end learners who already know basic CSS.
What you’ll learn
- Style empty elements with the :empty pseudo-class
- Use :target to show content linked from the URL
- Select lone children with :only-child and :only-of-type










