【发布时间】:2013-09-17 06:35:49
【问题描述】:
这是我的小提琴:http://jsfiddle.net/xxgkB/
我有一个容器<div>,它有一个孩子<p>
为什么将段落的显示值从块更改为行内块时,text-indent 的值会翻倍?
HTML:
<div class=container>
<p>Example Paragraph</p>
</div>
CSS:
div {
background: slategray;
height: 2in;
text-indent: 1in;
width: 2in;
}
p {
display: inline-block; /* Notice the change when removing this declaration */
}
【问题讨论】: