padding-inline-start CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.

The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

句法

/* <length> values */
padding-inline-start: 10px;   /* An absolute length */
padding-inline-start: 1em;    /* A length relative to the text size */
/* <percentage> value */
padding-inline-start: 5%;     /* A padding relative to the block container's width */
/* Global values */
padding-inline-start: inherit;
padding-inline-start: initial;
padding-inline-start: unset;
					

padding-inline-start property takes the same values as the padding-left 特性。

描述

This property corresponds to the padding-top , padding-right , padding-bottom ,或 padding-left property depending on the values defined for writing-mode , direction ,和 text-orientation .

It relates to padding-block-start , padding-block-end ,和 padding-inline-end , which define the other paddings of the element.

形式定义

初始值 0
适用于 所有元素
继承 no
百分比 logical-width of containing block
计算值 as <length>
动画类型 a length

形式句法

<'padding-left'>
					

范例

Setting inline start padding for vertical text

HTML

<div>
  <p class="exampleText">Example text</p>
</div>
					

CSS

div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}
.exampleText {
  writing-mode: vertical-lr;
  padding-inline-start: 20px;
  background-color: #C8C800;
}
					

规范

规范 状态 注释
CSS Logical Properties and Values Level 1
The definition of 'padding-inline-start' in that specification.
编者草案 初始定义

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
padding-inline-start Chrome 完整支持 69
完整支持 69
完整支持 2 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Edge 完整支持 79
完整支持 79
完整支持 79 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Firefox 完整支持 41
完整支持 41
不支持 38 — 51 Disabled
Disabled From version 38 until version 51 (exclusive): this feature is behind the layout.css.vertical-text.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 3 Alternate Name
Alternate Name Uses the non-standard name: -moz-padding-start
IE 不支持 No Opera 完整支持 56
完整支持 56
完整支持 15 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Safari 完整支持 12.1
完整支持 12.1
完整支持 3 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
WebView Android 完整支持 69
完整支持 69
完整支持 2 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Chrome Android 完整支持 69
完整支持 69
完整支持 18 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Firefox Android 完整支持 41
完整支持 41
不支持 38 — 51 Disabled
Disabled From version 38 until version 51 (exclusive): this feature is behind the layout.css.vertical-text.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 4 Alternate Name
Alternate Name Uses the non-standard name: -moz-padding-start
Opera Android 完整支持 48
完整支持 48
完整支持 14 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Safari iOS 完整支持 12.2
完整支持 12.2
完整支持 3 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start
Samsung Internet Android 完整支持 10.0
完整支持 10.0
完整支持 1.0 Alternate Name
Alternate Name Uses the non-standard name: -webkit-padding-start

图例

完整支持

完整支持

不支持

不支持

用户必须明确启用此特征。

用户必须明确启用此特征。

使用非标名称。

使用非标名称。

另请参阅

元数据

  • 最后修改:
  1. CSS
  2. CSS 参考
  3. CSS Logical Properties
  4. 指南
    1. Basic concepts of Logical Properties and Values
    2. Logical properties for floating and positioning
    3. Logical properties for margins, borders and padding
    4. Logical properties for sizing
  5. 特性
    1. block-size
    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-end-end-radius
    15. border-end-start-radius
    16. border-inline
    17. border-inline-color
    18. border-inline-end
    19. border-inline-end-color
    20. border-inline-end-style
    21. border-inline-end-width
    22. border-inline-start
    23. border-inline-start-color
    24. border-inline-start-style
    25. border-inline-start-width
    26. border-inline-style
    27. border-inline-width
    28. border-start-end-radius
    29. border-start-start-radius
    30. inline-size
    31. inset
    32. inset-block
    33. inset-block-end
    34. inset-block-start
    35. inset-inline
    36. inset-inline-end
    37. inset-inline-start
    38. margin-block
    39. margin-block-end
    40. margin-block-start
    41. margin-inline
    42. margin-inline-end
    43. margin-inline-start
    44. max-block-size
    45. max-inline-size
    46. min-block-size
    47. min-inline-size
    48. padding-block
    49. padding-block-end
    50. padding-block-start
    51. padding-inline
    52. padding-inline-end
    53. padding-inline-start

Copyright  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1