课程: HTML and CSS: Creating Navigation Bars
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Style a horizontal nav bar
(punchy electronic music) - [Instructor] So, how'd you do with that challenge? Hopefully it wasn't too terribly difficult for you! So, let me walk through how I made my particular navbar. So just to review once again, this is the way it looks. I've got a nice blue hover. I've got my icons changing color. And then I've got my logo, all the way over here on the left-hand side. How on earth did I make this happen? I'm going to tighten this back up again so we have room to look at the code here, and let's start with our HTML. So here in the HTML, the very first list item that I have is my LinkedIn Learning logo. And the way I set that up is as follows. So, I have my logo itself. There's the i with the class of linkedin, and the aria-hidden true, which we talked about before. And then inside of that, I've added a LinkedIn here. Okay? The words LinkedIn, and those are surrounded by a span with a class of sr-only. And that class of sr-only comes with the Font Awesome style sheet, and it…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
(已锁定)
Making navigation go horizontal with inline-block5 分钟 27 秒
-
(已锁定)
Making navigation go horizontal with Flexbox5 分钟 30 秒
-
(已锁定)
Centering and styling a horizontal navigation bar4 分钟 28 秒
-
(已锁定)
Placing a logo in the center of a horizontal nav bar7 分钟 2 秒
-
(已锁定)
Challenge: Style a horizontal nav bar1 分钟 33 秒
-
(已锁定)
Solution: Style a horizontal nav bar4 分钟 29 秒
-
(已锁定)
-
-
-