如何缩进文本
实例解析:
text-indent属性用于指定文本块中首行文本的缩进; 允许使用负值,如果值是负数,将第一行左缩进。
可以设置以下的值:
● length:定义固定的缩进。默认值:0。
● %:定义基于父元素宽度的百分比的缩进。
新建文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文网(php.cn)</title>
<style>
p {text-indent:50px;}
</style>
</head>
<body>
<p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'</p>
</body>
</html>
预览
Clear
- 课程推荐
- 课件下载
课件暂不提供下载,工作人员正在整理中,后期请多关注该课程~ 















