当前位置: css > CSS框架 >

Blueprint CSS framework 分析

时间:2010-01-05 20:47来源:网络 作者:秩名 点击:
以下是Blueprintcss官方网的例子,作者用相当清晰的代码展示了 Blueprintcss 精妙和强大的功能。 例子文件:Sample.html http://www.blueprintcss.org/tests/parts/sample.html link rel=stylesheet href=../../blueprint

以下是Blueprintcss官方网的例子,作者用相当清晰的代码展示了Blueprintcss精妙和强大的功能。

例子文件:Sample.html              http://www.blueprintcss.org/tests/parts/sample.html

<link rel="stylesheet" href="../../blueprint/screen.css" type="text/css" media="screen, projection">

这个文件将所有的CSS文件合并到一起,减少了并发连接数。

一共包含了以下几个CSS

/* reset.css */

/* typography.css */

/* forms.css */

/* grid.css */

此外,如果是IE8以下版本则包含/* ie.css */

  作者的注释已经很清晰了,代码也很清晰。跟着我一起理解一遍即可。

reset.css 代码:

  1. /* --------------------------------------------------------------      
  2.        
  3.    reset.css     
  4.    * Resets default browser CSS.     
  5.         
  6. -------------------------------------------------------------- */     
  7. /*原文作者注释已经很清晰了*/     
  8.      
  9.      
  10. html, body, div, span, object, iframe,      
  11. h1, h2, h3, h4, h5, h6, p, blockquote, pre,      
  12. a, abbr, acronym, address, code,      
  13. del, dfn, em, img, q, dl, dt, dd, ol, ul, li,      
  14. fieldset, form, label, legend,      
  15. table, caption, tbody, tfoot, thead, tr, th, td {      
  16.   margin0;      
  17.   padding0;      
  18.   border0;      
  19.   font-weight: inherit;      
  20.   font-style: inherit;      
  21.   font-size100%;      
  22.   font-family: inherit;      
  23.   vertical-align: baselinebaseline;      
  24. }      
  25. /*行高1.5,也就是150%,刚看了淘宝UED的碳酸饮料会杂志,上面有介绍*/     
  26. body {       
  27.   line-height1.5;       
  28. }      
  29.      
  30. /* Tables still need 'cellspacing="0"' in the markup. */
顶一下
(2)
100%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名:密码: 验证码:点击我更换图片
推荐内容