css中應該倒背如流的屬性

Text

  1. color 設置text的顏色
  2. text-align 設置text的對齊
  3. text-decoration 設置text的下劃線
  4. text-transformation 設置字母的大小寫和單詞的首字母大寫
  5. line-height 設置行高
  6. letter-spacing 設置字符間的距離

Font

  1. font-family 設置字體
  2. font-size 設置字體的大小
  3. font-style 設置字體爲斜體仍是正常顯示
  4. font-weight 加粗字體

Background

  1. background-color 設置背景的顏色
  2. background-image 設置背景圖片
  3. background-repeat 設置背景圖片的重複方式
  4. background-position 設置背景圖片的位置 默認爲top left

Lists

  1. list-style-type 設置list的類型,有circle等值

box-model

  1. margin 設置盒子的外邊距 外邊距是透明的。
  2. padding 設置盒子的內邊距 內邊距也是透明的。
  3. border 設置盒子的邊框,邊框爲不透明的。note:邊框必需要設置類型,不然將無效。
  4. float 設置盒子的浮動,浮動是絕對定位的一種,其佔位空間將消失。
  5. clear 清除盒子的浮動,清除封裝的那個盒子的浮動。

position and :after / :before

  1. :after 和 :before 一般都是和position一塊兒使用的。position分爲絕對定位和相對定位,相對定位的空間還在,絕對定位的空間就不在了。那兩個僞類+ position的絕對定位,由很是強大的威力,不少地方均可以用。好比微信的小紅點消息通知。

CSS3

  1. border-radius css3支持設置圓角
    -webkit-border-radius 支持webkit的瀏覽器
    -moz-border-radius: 支持moz的瀏覽器
    Syntax:提供一個半徑便可。
  2. box-shadow css3支持設置陰影
    -webkit-box-shadow
    -moz-box-shadow
    Syntax-shadow: none|h-shadow v-shadow blur spread color |inset|initial|inherit;css

  3. text-shadow css3 支持設置text陰影
    Syntax-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit;css3

  4. Multiple Backgrounds css3的背景圖支持多張背景圖web

  5. ** background-size** css3支持背景的尺寸
  6. text-overflow css3 支持對超出邊界的文字的處理
    Syntax:
    text-overflow: clip|ellipsis|string|initial|inherit;瀏覽器

  7. Flexible Box Model微信

  8. transform 分爲2d和3d 主要包括縮放、平移和旋轉。

未完待續......字體

相關文章
相關標籤/搜索