码迷,mamicode.com
首页 > Web开发 > 详细

2016 - 1- 22 Build a Nav bar (intro to HTML&CSS)

时间:2016-01-23 01:14:04      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

一:Learn how to build a NavBar --- allow user navigate ur site

   1. The hypetext refrence link 

   This attribute specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute.

 

   2. Whitespace is empty space in the HTML.Since the browser ignores whitespace in an HTML document, you can clearly lay out the code without affecting how the web page will look.

   The browers will ignore the space between tag, just like:

<a href = "aboutme.html"> <!--The ‘href‘ means hypertext refrence attribute-->
    Go to the about me page
</a>

<a href = "contact.html">
    Contact me
</a>


<a href = "untitled.html">
    Home
</a>

 So the page will display like that : 技术分享.

 And when want have the gap bettwen the links , we can use the html feature called entity.

 Like that : 

<a href = "aboutme.html"> <!--The ‘href‘ means hypertext refrence attribute-->
    Go to the about me page
</a>
&nbsp
<a href = "contact.html">
    Contact me
</a>
&nbsp
<a href = "untitled.html">
    Home
</a>

Pay attention to the "&nbsp", it means no-breaking space! So the page would like that :

技术分享.

Does it  looks better?

 

  3.And now we could make a relly "navbar" to allow user jump into other page ,and we just need to copy code in other document.And the page will looks like :

技术分享

 

  

2016 - 1- 22 Build a Nav bar (intro to HTML&CSS)

标签:

原文地址:http://www.cnblogs.com/BJTUzhengli/p/5152622.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!