您现在的位置:主页 > XHTML教程 > 文章内容

应把所有CSS样式都放在Head Tag

作者:admin     来源:未知     日期:2012-01-09    点击:0
  从技术上讲,你可以将样式您想要的位置。
  不过, HTML规范的建议,将他们放在文件头标记。
  主要的好处是,您的网页加载速度似乎更快一些。
 
div css xhtml xml Example Source Code Example Source Code [www.]<head>  
    <title>应把所有CSS样式都放在Head Tag - www.</title>  
    <link rel="stylesheet" type="text/css" media="screen" href="path//file.css" />  
    <link rel="stylesheet" type="text/css" media="screen" href="path//anotherFile.css" />  
</head>  
While researching performance at Yahoo!, we discovered that moving stylesheets to the document HEAD makes pages appear to be loading faster. This is because putting stylesheets in the HEAD allows the page to render progressively. 
                                                                                                                       - ySlow Team
   用户名: (新注册)  密码: 匿名评论 [所有评论]     注意:(评论内容不能超过250字,需审核后才会公布,可以匿名评论,请自觉遵守互联网相关政策法规。)

精彩广告

    精彩推荐


      Copyright © 2011-2013 CSS教程网 版权所有