课程: HTML and CSS: Creating Navigation Bars
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Creating dropdowns with CSS
- [Instructor] And now for the part you've all been waiting for, a dropdown menu using only CSS for our second layer of navigation. Lots of people do this with JavaScript, but it is completely possible to do this with CSS only it's not hard, it's well supported. So let's start with what we're looking at here. This is the same navigation bar we've used for all the course. And at this point in time, we still have our hamburger button in place. It still works just great. And here at desktop dimensions, I've added a few things. So you see here, I've added my second layer of navigation and you can see I've also added a caret next to the word about, that's going to be my indicator that this is a dropdown menu. Over in the HTML for you already, just to get us started. I've added that second layer of navigation that's here start sort of on line nine with the li, and it ends on line 16 with the /li inside of that, of course is our dropdown menu. And then on line nine here is the font awesome…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。