代码已经测试,兼容主流浏览器:
<style>.line{
width:100pxheight:25pxborder-bottom:1px solid #333
filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=0.45)/*IE*/
-moz-transform: rotate(45deg)/*Firefox*/
-webkit-transform: rotate(45deg)/*Safari,Chrome*/
}
</style>
<div class="line"></div>
1、起到注释的作用,里面的内容是说明该段css的情况的。例如:#header{height: 50px} /*-- header头部 --*/
其中的/*-- header头部 --*/ 是注释说明这个css是控制头部的,一个说明的作用。
2、还有就是可以把某段暂时不需要作用的css代码给注释掉,让它不起作用。
路径最左边加 / 表示从根目录引用文件。例如你的网站根目录是 E:\web
你的style在 E:\web\template\images\style.css
那么假如你有两个文件
E:\web\index.html
E:\web\news\index.html
如果两个文件都这样引用:<link href="template/images/style.css" > 【没有“/”】那么
E:\web\index.html 将调用 E:\web\template\images\style.css
E:\web\news\index.html 将调用 E:\web\news\template\images\style.css 【不存在的CSS,出错】
如果两个文件都这样引用:<link href="/template/images/style.css" > 【有“/”】那么
E:\web\index.html 将调用 E:\web\template\images\style.css
E:\web\news\index.html 将调用 E:\web\template\images\style.css
这样不管你的html或者其他asp、jsp、php所在的文件在哪里,它都会从根目录去找这个文件
从而解决一些目录同步的问题。
全是手打的,希望采纳,谢谢。