“Pr text text indent”的版本间差异

本页内容
(创建页面,内容为“{{DISPLAYTITLE:text-indent}}7 = CSS text-indent 属性 = 缩进段落的第一行50像素: <sample title="" desc="" lang="html" hererun="1"> p { text-indent:50px; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> p {text-indent:50px;} </style> </head> <body> <p>In my younger and more vulnerable years my father gave me some advice that…”)
 
Neo讨论 | 贡献
无编辑摘要
第56行: 第56行:
{| class="table table-striped table-hover"
{| class="table table-striped table-hover"
! 属性
! 属性
!
! Chrome
!
! Internet Explorer / Edge
!
! Firefox
!
! Safari
!
! Opera
|-
|-
| text-indent
| text-indent

2022年8月19日 (五) 04:29的版本

CSS text-indent 属性

缩进段落的第一行50像素:


示例

p

    {

    text-indent:50px;

    }

属性定义及使用说明

text-indent 属性规定文本块中首行文本的缩进。

注意: 负值是允许的。如果值是负数,将第一行左缩进。

默认值: 0
继承: yes
版本: CSS1
JavaScript 语法: object.style.textIndent="50px"

浏览器支持

表格中的数字表示支持该属性的第一个浏览器版本号。

属性 Chrome Internet Explorer / Edge Firefox Safari Opera
text-indent 1.0 3.0 1.0 1.0 3.5

属性值

描述
length 定义固定的缩进。默认值:0。
% 定义基于父元素宽度的百分比的缩进。
inherit 规定应该从父元素继承 text-indent 属性的值。

相关文章

CSS 教程: CSS 文本

此页面最后编辑于2022年8月19日 (星期五) 04:29。