行高问题

时间:2011-12-07 09:01:21

标签: html css

我尝试使用行高更接近跨度,但是当我给行高度小于13px时 它没有生效

以下是代码:

<span style="font-size: 10px; line-height: 9px;">
            Disclaimer: This e-mail message and any attachments to it are intended solely for the use of intended recipient(s) and may contain confidential or 
            legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution, 
            or taking any action in reliance on the contents of this e-mail or its attachments are strictly prohibited and may be against the law. 
            If you have received this communication in error, please notify us immediately by responding to this email and delete the message from your system. Simply Technologies 
            is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt
        </span>

http://jsfiddle.net/Q7mYR

如何让线条更接近?

2 个答案:

答案 0 :(得分:4)

范围更改为 p (块级元素),并且将遵循行高。请注意,小于字体大小的行高可能会导致字符截断。

答案 1 :(得分:2)

  1. 使用div或p或任何其他块级元素而不是span。
  2. 使用span{display:block;}