There are a lot of different techniques when learning something like that, youtube videos, academy-type sites, and books.
I prefer none of those... When I was learning CSS I taught myself the basics (the syntax), searched for it around the web. When I completed that, I just started building my website without knowing what exists and what doesn't, so whenever I had an idea of what I should do with a certain element, I searched the web, most of the time W3School would pop out and I would just scroll through it learning it in a few seconds.
My point is, don't try to learn it all at once, learn everything, but only when you need it. If you learn something when you need it, you won't ever forget it.