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

css学习笔记 2

时间:2016-02-22 12:11:21      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

css中的简写:

  1. 颜色的简写有三种:十六进制的形式、rgb(a)、颜色名称。
  2. 单位的省略:当属性值为0px时,可以简写为0。
  3. margin和padding的简写,不多说了。
  4. border的简写:border:border-width border-style border-color。在方向上,单独定义border-style/border-color/border-width可以实现在四个方向上的简写,如margin和padding一样,例:border-width:1px 2px 3px 4px。
  5. background的简写:background:background-color background-image background-repeat background-attachment background-position;
  6. 背景的默认值:background-color:transparent; background-image:none; background-repeat:repeat; background-attachment:scroll; background-position:0% 0%;
  7. 字体的简写:font:font-style font-varient font-weight font-size line-height font-family; 其中,文字大小和字体是必须的,font-size和line-height不是以空格分开而是以/分开,如12px/20px。
  8. 字体的默认值:font-style:normal; font-weight:normal; font-size:medium; line-height:normal; font-family:‘Times New Roman‘; font-varient:normal; 
  9. list-style的简写:list-style:list-style-image list-style-position list-style-type; 

css学习笔记 2

标签:

原文地址:http://www.cnblogs.com/huyang0528/p/5206332.html

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