您的位置:首页 > Web前端 > CSS

<link href ="css/index.css" rel="Stylesheet" type="text/css" />

2013-08-06 15:11 627 查看
<link href ="css/index.css" rel="Stylesheet" type="text/css" />
首先你这整条语句的意思就是:调用一个外部的CSS样式文件。他是通过<link/>这个标签来调用的。

然后, href="css/index.css" 表示外部样式文件的路径,rel="stylesheet"表示调用的是一种样式。

最后,type="text/css" 就具体说明调用样式的文件类型为CSS样式!

好处:调用外部样式能达到内容与样式分离的效果,优化网站!

这个标签的rel属性用于设置对象和链接目的间的关系,说白了就是指明你链进来的对象是个什么东西的,具体的值及其所表示的关系如下:

Alternate:Substitute version of the file that contains the link.

Appendix:Page that is an appendix for the set of pages.

Bookmark:Bookmark.

Chapter:Page that is a chapter for a set of pages.

Contents:Table of contents document.

Copyright:Copyright notice for the current page.

Glossary:Glossary for the current page.

Help:Help document.

Index:Index document for the current page.

Next:Next document in a sequence.

Offline:href that contains a path to the CDF file to be used for an offline favorite.

Prev:Previous document in a sequence.

Section:Page that is a section for a set of pages.

Shortcut:Icon href that contains a path to an icon file to be used for the favorite or link.

Start:First document of a set.

Stylesheet:Style sheet.

Subsection:Page that is a subsection for a set of pages.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐