CSS 参考

本页面按字母序列出了所有标准的 CSS 属性、伪类、伪元素、@规则、单位和选择器。您可以快速访问到各个词条的详细内容。在这里不仅列出了 CSS1 和 CSS2.1 的属性,还列出了 CSS3 中已标准化或已固定的属性和概念。

另外,您可以通过查看 Mozilla CSS 扩展页面了解那些 Gecko 私有的 CSS 属性、WebKit CSS 扩展页面了解那些 WebKit 私有的 CSS 属性,以及带前缀的 CSS 属性页面查看所有非标准的 CSS 属性.

  1. A
    1. :active
    2. additive-symbols
    3. ::after (:after)
    4. align-content
    5. align-items
    6. align-self
    7. all
    8. animation
    9. animation-delay
    10. animation-direction
    11. animation-duration
    12. animation-fill-mode
    13. animation-iteration-count
    14. animation-name
    15. animation-play-state
    16. animation-timing-function
    17. @annotation
    18. annotation()
    19. attr()
  2. B
    1. ::backdrop
    2. backface-visibility
    3. background
    4. background-attachment
    5. background-blend-mode
    6. background-clip
    7. background-color
    8. background-image
    9. background-origin
    10. background-position
    11. background-repeat
    12. background-size
    13. ::before (:before)
    14. block-size
    15. blur()
    16. border
    17. border-block-end
    18. border-block-end-color
    19. border-block-end-style
    20. border-block-end-width
    21. border-block-start
    22. border-block-start-color
    23. border-block-start-style
    24. border-block-start-width
    25. border-bottom
    26. border-bottom-color
    27. border-bottom-left-radius
    28. border-bottom-right-radius
    29. border-bottom-style
    30. border-bottom-width
    31. border-collapse
    32. border-color
    33. border-image
    34. border-image-outset
    35. border-image-repeat
    36. border-image-slice
    37. border-image-source
    38. border-image-width
    39. border-inline-end
    40. border-inline-end-color
    41. border-inline-end-style
    42. border-inline-end-width
    43. border-inline-start
    44. border-inline-start-color
    45. border-inline-start-style
    46. border-inline-start-width
    47. border-left
    48. border-left-color
    49. border-left-style
    50. border-left-width
    51. border-radius
    52. border-right
    53. border-right-color
    54. border-right-style
    55. border-right-width
    56. border-spacing
    57. border-style
    58. border-top
    59. border-top-color
    60. border-top-left-radius
    61. border-top-right-radius
    62. border-top-style
    63. border-top-width
    64. border-width
    65. bottom
    66. box-decoration-break
    67. box-shadow
    68. box-sizing
    69. break-after
    70. break-before
    71. break-inside
    72. brightness()
  3. C
    1. calc()
    2. caption-side
    3. ch
    4. @character-variant
    5. character-variant()
    6. @charset
    7. :checked
    8. circle()
    9. clear
    10. clip
    11. clip-path
    12. cm
    13. color
    14. columns
    15. column-count
    16. column-fill
    17. column-gap
    18. column-rule
    19. column-rule-color
    20. column-rule-style
    21. column-rule-width
    22. column-span
    23. column-width
    24. content
    25. contrast()
    26. counter-increment
    27. counter-reset
    28. @counter-style
    29. cubic-bezier()
    30. cursor
  4. D
    1. :default
    2. deg
    3. :dir()
    4. direction
    5. :disabled
    6. display
    7. @document
    8. dpcm
    9. dpi
    10. dppx
    11. drop-shadow()
  5. E
    1. element()
    2. ellipse()
    3. em
    4. :empty
    5. empty-cells
    6. :enabled
    7. ex
  6. F
    1. fallback
    2. filter
    3. :first
    4. :first-child
    5. ::first-letter (:first-letter)
    6. ::first-line (:first-line)
    7. :first-of-type
    8. flex
    9. flex-basis
    10. flex-direction
    11. flex-flow
    12. flex-grow
    13. flex-shrink
    14. flex-wrap
    15. float
    16. :focus
    17. font
    18. @font-face
    19. font-family
    20. font-family
    21. font-feature-settings
    22. @font-feature-values
    23. font-kerning
    24. font-language-override
    25. font-size
    26. font-size-adjust
    27. font-stretch
    28. font-stretch
    29. font-style
    30. font-style
    31. font-synthesis
    32. font-variant
    33. font-variant
    34. font-variant-alternates
    35. font-variant-caps
    36. font-variant-east-asian
    37. font-variant-ligatures
    38. font-variant-numeric
    39. font-variant-position
    40. font-weight
    41. font-weight
    42. :fullscreen
  7. G
    1. grad
    2. grayscale()
    3. grid
    4. grid-area
    5. grid-auto-columns
    6. grid-auto-flow
    7. grid-auto-position
    8. grid-auto-rows
    9. grid-column
    10. grid-column-start
    11. grid-column-end
    12. grid-row
    13. grid-row-start
    14. grid-row-end
    15. grid-template
    16. grid-template-areas
    17. grid-template-rows
    18. grid-template-columns
  8. H
    1. height
    2. height
    3. :hover
    4. hsl()
    5. hsla()
    6. hue-rotate()
    7. hyphens
    8. hz
  9. I
    1. image()
    2. image-rendering
    3. image-resolution
    4. image-orientation
    5. ime-mode
    6. @import
    7. in
    8. :indeterminate
    9. inherit
    10. initial
    11. inline-size
    12. :in-range
    13. inset()
    14. :invalid
    15. invert()
    16. isolation
  10. J
    1. justify-content
  11. K
    1. @keyframes
    2. khz
  12. L
    1. :lang()
    2. :last-child
    3. :last-of-type
    4. left
    5. :left
    6. letter-spacing
    7. linear-gradient()
    8. line-break
    9. line-height
    10. :link
    11. list-style
    12. list-style-image
    13. list-style-position
    14. list-style-type
  13. M
    1. margin
    2. margin-block-end
    3. margin-block-start
    4. margin-bottom
    5. margin-inline-end
    6. margin-inline-start
    7. margin-left
    8. margin-right
    9. margin-top
    10. marks
    11. mask
    12. mask-type
    13. matrix()
    14. matrix3d()
    15. max-block-size
    16. max-height
    17. max-height
    18. max-inline-size
    19. max-width
    20. max-width
    21. max-zoom
    22. @media
    23. min-block-size
    24. min-height
    25. min-height
    26. min-inline-size
    27. minmax()
    28. min-width
    29. min-width
    30. min-zoom
    31. mix-blend-mode
    32. mm
    33. ms
  14. N
    1. @namespace
    2. negative
    3. :not()
    4. :nth-child()
    5. :nth-last-child()
    6. :nth-last-of-type()
    7. :nth-of-type()
  15. O
    1. object-fit
    2. object-position
    3. offset-block-end
    4. offset-block-start
    5. offset-inline-end
    6. offset-inline-start
    7. :only-child
    8. :only-of-type
    9. opacity
    10. opacity()
    11. :optional
    12. order
    13. orientation
    14. @ornaments
    15. ornaments()
    16. orphans
    17. outline
    18. outline-color
    19. outline-offset
    20. outline-style
    21. outline-width
    22. :out-of-range
    23. overflow
    24. overflow-wrap
    25. overflow-x
    26. overflow-y
  16. P
    1. pad
    2. padding
    3. padding-block-end
    4. padding-block-start
    5. padding-bottom
    6. padding-inline-end
    7. padding-inline-start
    8. padding-left
    9. padding-right
    10. padding-top
    11. @page
    12. page-break-after
    13. page-break-before
    14. page-break-inside
    15. pc
    16. perspective
    17. perspective()
    18. perspective-origin
    19. pointer-events
    20. polygon()
    21. position
    22. prefix
    23. pt
    24. px
  17. Q
    1. quotes
  18. R
    1. rad
    2. radial-gradient()
    3. range
    4. :read-only
    5. :read-write
    6. rect()
    7. rem
    8. repeat()
    9. ::repeat-index
    10. ::repeat-item
    11. repeating-linear-gradient()
    12. repeating-radial-gradient()
    13. :required
    14. resize
    15. rgb()
    16. rgba()
    17. right
    18. :right
    19. :root
    20. rotate()
    21. rotatex()
    22. rotatey()
    23. rotatez()
    24. rotate3d()
    25. ruby-align
    26. ruby-merge
    27. ruby-position
  19. S
    1. s
    2. saturate()
    3. scale()
    4. scalex()
    5. scaley()
    6. scalez()
    7. scale3d()
    8. :scope
    9. scroll-behavior
    10. scroll-snap-coordinate
    11. scroll-snap-destination
    12. scroll-snap-points-x
    13. scroll-snap-points-y
    14. scroll-snap-type
    15. scroll-snap-type-x
    16. scroll-snap-type-y
    17. ::selection
    18. sepia()
    19. shape-image-threshold
    20. shape-margin
    21. shape-outside
    22. skew()
    23. skewx()
    24. skewy()
    25. speak-as
    26. src
    27. steps()
    28. @styleset
    29. styleset()
    30. @stylistic
    31. stylistic()
    32. suffix
    33. @supports
    34. @swash
    35. swash()
    36. symbols
    37. symbols()
    38. system
    T
    1. table-layout
    2. tab-size
    3. :target
    4. text-align
    5. text-align-last
    6. text-combine-upright
    7. text-decoration
    8. text-decoration-color
    9. text-decoration-line
    10. text-decoration-style
    11. text-indent
    12. text-orientation
    13. text-overflow
    14. text-rendering
    15. text-shadow
    16. text-transform
    17. text-underline-position
    18. top
    19. touch-action
    20. transform
    21. transform-box
    22. transform-origin
    23. transform-style
    24. transition
    25. transition-delay
    26. transition-duration
    27. transition-property
    28. transition-timing-function
    29. translate()
    30. translatex()
    31. translatey()
    32. translatez()
    33. translate3d()
    34. turn
  20. U
    1. unicode-bidi
    2. unicode-range
    3. :unresolved
    4. unset
    5. url()
    6. user-zoom
  21. V
    1. :valid
    2. var()
    3. vertical-align
    4. vh
    5. @viewport
    6. visibility
    7. :visited
    8. vmax
    9. vmin
    10. vw
  22. W
    1. white-space
    2. widows
    3. width
    4. width
    5. will-change
    6. word-break
    7. word-spacing
    8. word-wrap
    9. writing-mode
  23. X Y Z
    1. z-index
    2. zoom

选择器

  • 基本选择器
    • 元素选择器 elementname
    • 类选择器 .classname
    • ID选择器 #idname
    • 通配选择器 * ns|* *|*
    • 属性选择器 [attr=value]
  • 组合选择器
    • 相邻兄弟选择器 A + B
    • 通用兄弟选择器 A ~ B
    • 子选择器 A > B
    • 后代选择器 A B
  • 伪元素
  • 伪类

CSS3 教程

下面的文章教你如何使用一些 CSS3 中新出现的技术:

  • 如何使用媒体查询
  • 如何使用 CSS 计数器
  • 如何使用 CSS 渐变
  • 如何使用 CSS 变形
  • 如何使用 CSS 动画
  • 如何使用 CSS 过渡
  • 如何使用 CSS 多背景
  • 如何使用 CSS 弹性盒
  • 如何使用 CSS 多列布局

概念

  • CSS 语法
  • @规则
  • 注释
  • 权重
  • 初始值
  • 继承
  • 指定值
  • 计算值
  • 使用值
  • 实际值
  • 盒式模型
  • 替换元素
  • 属性值定义语法


文章来源:https://developer.mozilla.org/zh-CN/docs/Web/CSS/Reference

你可能感兴趣的:(移动开发)