【问题标题】:how to decrease the height of content area for <span> with css?如何使用 css 减少 <span> 的内容区域的高度?
【发布时间】:2013-11-01 19:51:43
【问题描述】:

谁能告诉我如何用css减少span标签的内容区域的高度?

我想,1. 使底部的橙色虚线更靠近上面的文字。 (border-bottom: 3px orange dotted;) 2. 降低黄色高亮框的高度。 (主体{背景颜色:黄色})

我之前发布了一个关于 p 标签的类似问题,但该规则不适用于 span 标签。猜测是因为块和内联的区别。

how to decrease the height of content area for <p> with css?

谢谢!

【问题讨论】:

  • 重现问题的 HTML 和 CSS 代码是什么?这真的是特定于 uiwebview 的吗?

标签: javascript html css uiwebview


【解决方案1】:
<span style="line-height:70%"></span>

【讨论】:

    【解决方案2】:

    尝试设置display: inline-block

    span{
        display: inline-block;
        line-height: 1em !important; 
    }
    

    值行高来自how to decrease the height of content area for <p> with css?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-15
      • 1970-01-01
      • 1970-01-01
      • 2022-01-17
      • 2018-03-31
      • 2019-01-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多