CSS 页面元素

1. 文字基本样式

  • font-family
  • font-size
  • font-weight
  • font-style
  • color

2. 段落样式

  • text-indent:2em;(缩进)
  • line-height:1.5;(行高)

3. 特殊效果

  • :first-letter;
  • :first-line;
  • overflow:hidden;
  • visibility:hidden;
  • display:none;

4. 文字链接

  • :link;
  • :visited;
  • :hover;
  • :active;

4. 背景

  • background-color:red;
  • background-image:url(images/logo.jpg);
  • background-repeat:no-repeat;(repeat-x,repeat-y)
  • background-position:right bottom;
    (top,center,bottom,left,right)
    (background-postion:50% 100px;//水平50%,垂直100px)
    (可使用负值)
  • background:#FFFFFF url(images/logo.jpg) no-repeat center center;
  • CSS Sprite(雪碧图);

5. 列表

  • ul;
  • ol;
  • dl;
  • list-style-image;
  • list-style-position:outside(inside);
  • list-style-type;(修饰符的类型,空心圆,实心方块什么的。)
  • display:block;(将 a 标签转化为块元素)
原文地址:https://www.cnblogs.com/HuoAA/p/5074147.html