ccdc
<html>
<head>
<title>测试span元素</title>
</head>

<body>
第一种情况:直接使用text-indent <br />
<span style="text-indent:2em;">缩进的内容</span>
<hr>

第二种情况:使用display把span定义成block <br />
<span style="display:block;text-indent:2em;">缩进的内容</span>
<hr>

<p>第三种情况:直接使用text-indent,但在这个span前是一个block型的元素p </p>
<span style="text-indent:2em;">缩进的内容</span>
</body>
</html>

转自:时尚樱子咖啡厅  CSS中span元素与text-indent(段落缩进)的应用

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-10-13
  • 2021-10-01
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2021-05-28
  • 2022-02-01
相关资源
相似解决方案