减少文本的行间距

减少文本的行间距

本文介绍了CSS:减少文本的行间距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用CSS line-height(或height - 我试过两者)缩小文本行之间的间距。

I am having difficulty reducing the spacing between lines of text with CSS line-height (or height - I've tried both).

我有一点点的文本和间距是关闭。我试过修改(似乎)适用的样式,并将文本包含在< span> ...< / span> 样式。似乎没有什么工作。

I have a small bit of text and the spacing is off. I've tried modifying the styles that (appear to) apply, and also enclosing the text in a <span>...</span> and explicitly declaring the style. Nothing seems to work.

网站是使用Pagelineslite主题的Wordpress网站。网址为,问题出现在首页(您可以看到它)在文本的第四列,刚好在电子邮件订阅框中的小文本 - 该文本的行间距关闭。此网站不允许我张贴屏幕截图,因为我在这里...对不起。

The site isa Wordpress site using the Pagelines "lite" theme. The URL is http://stage.dsthree.com and the issue is on the front page (you can see it in the fourth column of text, just below the "email subscribe" box in the small text - the line spacing for that text is off. This site will not allow me to post a screenshot, as I am new here...sorry.

我已将line-height缩减为1%和1px,但不起作用。

I've reduced the line-height to 1% and to 1px to no effect.

推荐答案

内联元素不支持诸如<$

Inline elements don't honour properties such as line-height; they take on the line height of the nearest block parent.

请参阅

解决方案:从主体中删除线高,或将跨度变为块(即使它成为div;不要给 display:block )。

Solution: remove the line-height from the body, or turn the span into a block (i.e. make it a div; don't give display:block to the span).

这篇关于CSS:减少文本的行间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 03:30