css简单属性

来源:互联网 发布:wifi网络优化大师 编辑:程序博客网 时间:2024/05/19 09:36

CSS  Cascade Style Sheet 
     级联样式表
    
     文字的颜色 前景色
     bgcolor


  CSS :  1 网页做显示效果
         2 解决原始html的显示效果麻烦
        
  怎么用Css
    1 内联式
       <Element style="color:red"/>
    2 页面式
       <head>
         <style type="text/css">
            h1{
             
            }
         </style>
       </head>
      
      
        1 标签选择器
          h1{
         
          }
          特例
           1 多路标签选择器
              h1,div{
             
              }
           2 全选择器
              *
       
        2 类选择器
          <Element class="style"/>
         
          .style{
           
          }
       
          特例
            div.style{
           
            }
       
        3 id选择器
       
        4 派生选择器  

 

引入css 
     1) <style type="text/css"></style>
     2) <link rel="stylesheet" type="text/css" href="path"/>
     3) nested

文本相关
   text-align : left | center | right
   text-indent : 10px
   text-decoration: none|blink|underline|line-through|overline
  

字体相关
     color : 制定文字颜色
     font-family : 字体:
                  “times new Roman" , times , serif ....
     font-weight : normal , bold , lighter , bolder
     font-size : xxxx
               % , smaller , larger .
     font-style : normal,italic,oblique
     letter-spacing : 字符间隔
     word-spacing : 单词间隔
颜色背景

    background-color :
    background-image:url( images/xxxx.jpg )
    background-repeat :  决定显示方式。
                        repeat : 重复显示
                         repeat-x : 左上方开始横向重复显示。
                        repeat-y : 纵向重复显示
                        no-repeat : 只显示一次 。
 
边框相关
    border : style width color
   style : 边框的种类.
       none , hidden , dotted , dashed .solid , double, groove , ridge, inset , outset
   border-top:
   border-left:
   border-right:
   border-bottom;   
    border-style :
  border-top-style :
  border-left-style :
  border-right-style:
  border-bottom-style :
    border-width:
  border-top-width:
  border-left-width:
  border-right-width:
  border-bottom-width:
   border-color :
  border-top-color:
  border-left-color:
  border-right-color:
  border-bottom-color:

高度,宽度 :
    width : height :
 
内边距   
    padding:
   padding-top
   padding-right
   padding-left
    padding-bottom
   
外边距   
    margin:
   margin-top
   margin-right
   margin-left
   margin-bottom
  
超级链接相关
    a:link
    a:hover
    a:active
    a:visited  
  
特殊属性
    display: none|block|inline
    cursor:  pointer|wait
   
定位属性
    position:static|absolute|relative
    z-index: 值
    top:
    left:
   
列表相关          
   list-style-type none|disc|circle|decimal|lower-roman|upper-roman

 

 


        

原创粉丝点击