-1

我试图将段落内的行高保持在 1.0。这是我正在使用的 CSS 类:

.bottombarinfo{
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
line-height: 1.0;}

这是我在 HTML 代码中使用 CSS 类的地方,它是一个段落/跨度:

    <p><img src="images/1.jpg" alt="HTC ONE" width="238" height="168" class="floatleft">
<span class="bottombarinfo">From its beautifully designed aluminum chasse to its fluid Android OS, the HTC one is spectacular, but is it the phone to go agains the Galaxy S4 and
Apple's iPhone 5?</span></p>

我尝试将图片放在段落之外并删除/更改跨度,但是所有三个主要浏览器,Firefox、chrome 和 IE 都以接近 2.0 的行高来分隔文本。那么我应该怎么做才能让浏览器显示 1.0 的行高呢?提前致谢!

4

2 回答 2

0
<p><img src="images/1.jpg" alt="HTC ONE" width="238" height="168" class="floatleft" />
<span class="bottombarinfo">From its beautifully designed aluminum chasse to its fluid Android OS, the HTC one is spectacular, but is it the phone to go agains the Galaxy S4 and

苹果的 iPhone 5?

.bottombarinfo {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12px;
  line-height: 300%;
}

提琴手

在这里玩,把它拿到你想要的地方

于 2013-04-10T20:09:04.047 回答
0

您是否尝试过使用重置样式表来阻止浏览器的默认样式?它们可以在网上找到并免费下载。请务必将其作为您的第一个样式表。

于 2013-04-10T18:55:19.147 回答