CSS的样式(1)

 背景:


     1、颜色:

    background-color
         p{backgroud-color:gray;}



     2、内边距:{background-color:gray;padding:20px}



     3、背景图像:body{background-image:url(/i/eg_bg_04.gif)}



     4、背景重复:

  body{background-image:url;
      background-repeat:repeat(-X/-y}



     5、背景定位:改变图像在背景中的位置。


    {background-image:url;
     background-repeat:no-repeat
     background-position:center/top/botton/left/right}


     6、背景大小(size):接数字和百分比,建议接数字



     7、背景关联:{background-attachment:fixed}

文本:

     1、缩进:

    text-indent(正负值)
    p{text-indent:5em(/-5em);}



     2、对齐:text-align(center、left、right)



     3、文本装饰:

  text-decration(none/underline/overline/line-through/blink)
      链接默认地会有下划线。如果想要去掉超链接的下划线,可以使用CSS 来做到这一点:
    {text-decoration:none}



     4、字母间距:{letter-spacing:-0.5em}



     5、字间距:{word-spacing:30px;}



     6、字符转换:{text-transform:uppercase}:

      文本全部大写:uppercase;全小写:lowercase;
      每个单词的首字母大写:capitalize


     7、文本方向:{direction:ltr;rtl}

字体:

     1、大小:{font-size:60px}



     2、加粗:{font-weight:normal(400)/bold(700)/900}



     3、指定字体系列:{font-family:希望的字体}



     4、字体风格:{font-style:normal文本正常显示;italic文本斜体显示;oblique文本倾斜;}
    

posted @ 2016-03-27 20:53  白教主  阅读(117)  评论(0编辑  收藏  举报