梦之都
CSS教程
,
text-indent
示例,
段落p
的父级元素是body,那么段落p第一行的缩进总是相对于
body元素
的38%(什么是父级元素我将在CSS高级教程中介绍).
<head>
<title>CSS text-indent 属性百分比缩进示例 -- CSS教程</title> <style type="text/css" media="all"> p { text-indent:38%; width:150px; } </style> </head> <body> <p>梦之都 <a href="http://www.dreamdu.com/css/">CSS教程</a>,<strong><a href="http://www.dreamdu.com/css/property_text_indent/">text-indent</a></strong>示例,<a href="http://www.dreamdu.com/xhtml/tag_p/">段落p</a>的父级元素是body,那么段落p第一行的缩进总是相对于<a href="http://www.dreamdu.com/xhtml/tag_body/">body元素</a>的38%(什么是父级元素我将在CSS高级教程中介绍).</p> </body> </html>