我有一段文本,图像,链接等段落,我无法使用行高度属性。我使用PHP从数据库中检索这些内容。div中的行高不像预期的那样工作
一个典型的情况是,
<div class = "story">
Now there are many complaints. We will study the matter... Whether there is a need for a separate policy or some kind of clarification is needed, we will make it clear soon
Now there are many complaints. We will study the matter... Whether there is a need for a separate policy or some kind of clarification is needed, we will make it clear soon
</div>
.story{
line-height: 200px;
}
I中的内容到一个输入,并将其存储在一个分贝。现在我观察到,在任何时候我通过按回车身体结束了我的行,我得到了200像素的差距。不在线之间。根据屏幕分辨率和其他事情,一条线可以在任何地方结束?
但它是工作这样的事情,
编辑1:是的,我曾尝试自动换行:打破字这是行不通的。
没有明白这个问题,但你总是可以使用width属性来限制div元素的宽度。也应该是
而不是。 – albusshin 2014-10-08 13:31:57
你的问题没有意义。 – GolezTrol 2014-10-08 13:32:01
这是因为您使用“行高”来垂直放置文本块?如果是这样,你正在解决错误的问题。 – George 2014-10-08 13:32:39