这是我的Fiddle:http://jsfiddle.net/xxgkB/
我有一个包含一个子元素
为什么当将段落元素的显示属性从块级改为内联块级时,
<p>
的容器<div>
。为什么当将段落元素的显示属性从块级改为内联块级时,
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 */
}