• Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Accessibility

      Build web projects usable for all

    • Web Technology

      Web technology reference for developers

  • Learn
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum New
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  • Log in
  • Sign up for free
  1. 面向开发者的 Web 技术
  2. CSS:层叠样式表
  3. scroll-margin-block-start
    • English (US)
    • Deutsch
    • Français
    • 日本語

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

在本文中

  • 尝试一下
  • 语法
  • 形式定义
  • 形式语法
  • 规范
  • 浏览器兼容性
  • 参见
  1. CSS
  2. 初学者教程
  3. 你的第一个网站:样式化内容
  4. CSS 样式基础
    1. CSS 如何运行
    2. 让我们开始 CSS 的学习之旅
    3. 挑战:为传记页面添加样式
    4. CSS 选择器
    5. 属性选择器
    6. 伪类和伪元素
    7. 关系选择器
    8. 盒模型
    9. 层叠、优先级与继承
    10. 值和单位
    11. 在 CSS 中调整大小
    12. 背景与边框
    13. 溢出的内容
    14. 图像、媒体和表单元素
    15. 样式化表格
    16. 调试 CSS
    17. 挑战:基本的 CSS 理解
    18. 挑战:创建精美的信纸
    19. 挑战:一个漂亮的盒子
  5. CSS 文本样式
    1. 基本文本和字体样式
    2. 为列表添加样式
    3. 样式化链接
    4. Web 字体
    5. 挑战:排版社区大学首页
  6. CSS 布局概述
    1. 介绍 CSS 布局
    2. 浮动
    3. 定位
    4. 弹性盒子
    5. 网格
    6. 响应式设计
    7. 媒体查询入门指南
    8. 挑战:基本布局理解
  7. CSS 参考
  8. 模块
    1. CSS anchor positioning
    2. CSS 动画
    3. CSS 背景和边框
    4. CSS Basic User Interface
    5. CSS 盒子对齐
    6. CSS 基础框盒模型
    7. CSS box sizing
    8. CSS cascading and inheritance
    9. CSS 颜色调整
    10. CSS 颜色
    11. CSS compositing and blending
    12. CSS conditional rules
    13. CSS 局限
    14. CSS 计数器样式
    15. CSS custom properties for cascading variables
    16. CSS display
    17. CSS filter effects
    18. CSS 弹性盒子布局
    19. CSS font loading
    20. CSS 字体
    21. CSS 片段
    22. CSS 生成内容
    23. 网格布局
    24. CSS images
    25. CSS inline layout
    26. CSS lists and counters
    27. CSS 逻辑属性与逻辑值
    28. CSS Masking
    29. 媒体查询
    30. CSS motion path
    31. CSS 多列布局
    32. CSS namespaces
    33. CSS 嵌套
    34. CSS overflow
    35. CSS overscroll behavior
    36. CSS 分页媒体
    37. CSS 定位布局
    38. CSS properties and values API
    39. CSS pseudo-elements
    40. CSS ruby layout
    41. CSS scoping
    42. CSS scroll anchoring
    43. CSS 滚动吸附
    44. CSS scroll-driven animations
    45. CSS Scrollbars
    46. CSS 选择器
    47. CSS shadow parts
    48. CSS 形状
    49. CSS syntax
    50. CSS Table
    51. CSS Text
    52. CSS 文本装饰
    53. CSS Transforms
    54. CSS 过渡
    55. CSS 值和单位
    56. CSS 视图过渡
    57. CSS 书写模式
    58. CSS 对象模型视图
  9. 属性
    1. -moz-*
      1. -moz-float-edge 非标准 已弃用
      2. -moz-force-broken-image-icon 非标准 已弃用
      3. -moz-image-region 非标准
      4. -moz-orient 非标准
      5. -moz-user-focus 非标准 已弃用
      6. -moz-user-input 非标准 已弃用
    2. -webkit-*
      1. -webkit-border-before 非标准
      2. -webkit-box-reflect 非标准
      3. -webkit-mask-box-image 非标准
      4. -webkit-mask-composite 非标准
      5. -webkit-mask-position-x 非标准
      6. -webkit-mask-position-y 非标准
      7. -webkit-mask-repeat-x 非标准
      8. -webkit-mask-repeat-y 非标准
      9. -webkit-tap-highlight-color 非标准
      10. -webkit-text-fill-color
      11. -webkit-text-security 非标准
      12. -webkit-text-stroke
      13. -webkit-text-stroke-color
      14. -webkit-text-stroke-width
      15. -webkit-touch-callout 非标准
    3. 自定义属性(--*):CSS 变量
    4. accent-color
    5. align-*
      1. align-content
      2. align-items
      3. align-self
    6. alignment-baseline
    7. all
    8. anchor-name 实验性
    9. animation-*
      1. animation
      2. animation-composition
      3. animation-delay
      4. animation-direction
      5. animation-duration
      6. animation-fill-mode
      7. animation-iteration-count
      8. animation-name
      9. animation-play-state
      10. animation-range 实验性
      11. animation-range-end 实验性
      12. animation-range-start 实验性
      13. animation-timeline 实验性
      14. animation-timing-function
    10. appearance
    11. aspect-ratio
    12. backdrop-filter
    13. backface-visibility
    14. background-*
      1. background
      2. background-attachment
      3. background-blend-mode
      4. background-clip
      5. background-color
      6. background-image
      7. background-origin
      8. background-position
      9. background-position-x
      10. background-position-y
      11. background-repeat
      12. background-size
    15. block-size
    16. border-*
      1. border
      2. border-block
      3. border-block-color
      4. border-block-end
      5. border-block-end-color
      6. border-block-end-style
      7. border-block-end-width
      8. border-block-start
      9. border-block-start-color
      10. border-block-start-style
      11. border-block-start-width
      12. border-block-style
      13. border-block-width
      14. border-bottom
      15. border-bottom-color
      16. border-bottom-left-radius
      17. border-bottom-right-radius
      18. border-bottom-style
      19. border-bottom-width
      20. border-collapse
      21. border-color
      22. border-end-end-radius
      23. border-end-start-radius
      24. border-image
      25. border-image-outset
      26. border-image-repeat
      27. border-image-slice
      28. border-image-source
      29. border-image-width
      30. border-inline
      31. border-inline-color
      32. border-inline-end
      33. border-inline-end-color
      34. border-inline-end-style
      35. border-inline-end-width
      36. border-inline-start
      37. border-inline-start-color
      38. border-inline-start-style
      39. border-inline-start-width
      40. border-inline-style
      41. border-inline-width
      42. border-left
      43. border-left-color
      44. border-left-style
      45. border-left-width
      46. border-radius
      47. border-right
      48. border-right-color
      49. border-right-style
      50. border-right-width
      51. border-spacing
      52. border-start-end-radius
      53. border-start-start-radius
      54. border-style
      55. border-top
      56. border-top-color
      57. border-top-left-radius
      58. border-top-right-radius
      59. border-top-style
      60. border-top-width
      61. border-width
    17. bottom
    18. box-*
      1. box-align 非标准 已弃用
      2. box-decoration-break
      3. box-direction 非标准 已弃用
      4. box-flex 非标准 已弃用
      5. box-flex-group 非标准 已弃用
      6. box-lines 非标准 已弃用
      7. box-ordinal-group 非标准 已弃用
      8. box-orient 非标准 已弃用
      9. box-pack 非标准 已弃用
      10. box-shadow
      11. box-sizing
    19. break-*
      1. break-after
      2. break-before
      3. break-inside
    20. caption-side
    21. caret-color
    22. clear
    23. clip-*
      1. clip 已弃用
      2. clip-path
      3. clip-rule
    24. color-*
      1. color
      2. color-interpolation
      3. color-interpolation-filters
      4. color-scheme
    25. column-*
      1. column-count
      2. column-fill
      3. column-gap
      4. column-rule
      5. column-rule-color
      6. column-rule-style
      7. column-rule-width
      8. column-span
      9. column-width
    26. columns
    27. contain-*
      1. contain
      2. contain-intrinsic-block-size
      3. contain-intrinsic-height
      4. contain-intrinsic-inline-size
      5. contain-intrinsic-size
      6. contain-intrinsic-width
    28. container-*
      1. container
      2. container-name
      3. container-type
    29. content
    30. content-visibility
    31. counter-*
      1. counter-increment
      2. counter-reset
      3. counter-set