For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/css/properties/text-indent.md.
Lynx
  • 简体中文
  • text-indent

    介绍

    text-indent 属性能定义一个 text 首行文本内容之前的缩进量

    使用示例

    语法

    /* <length> values */
    text-indent: 40px;
    
    /* <percentage> value
       relative to the containing block width */
    text-indent: 15%;

    取值

    形式定义

    初始值0
    适用元素text
    是否支持继承no
    是否支持动画no

    形式语法

    <length> | <percentage>

    与 Web 的区别

    在写百分比的时候需要声明 text 元件的宽度,否则会不生效

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。