为什么不是css属性'line-height'不让我做出真正紧密的线条空间,但在chrome中的宽的工作正常? [英] Why isn't the css property 'line-height' not letting me make really tight line-spaces but works fine for wide ones in chrome?
问题描述
我有一个段落标签,我在其他地方定义的行高度为15px,我有另一个段落标签进一步向下的页面,我想使行高度在10px左右。有趣的是,它不会让我降低到10像素或更小的那个,但是当我将其设置为25像素或更高,line-height属性似乎工作。
I have a paragraph tag that I defined elsewhere with a line height of 15px, and I have another paragraph tag further down the page where I want to make the line height around 10px. Funny thing is, it won't let me get down to 10px or anything smaller than that, but when I set it to 25px or higher, the line-height property seems to be working.
我通过chrome浏览器的web开发工具栏(chrome的firefox的firebug版本)检查了相关的css(所有的手工编码),没有找到任何相关的。是否有一个常见的css错误,阻止我收缩行高超过一定的最小量?
I checked the relevant css (all hand-coded) via the chrome browser's web developer toolbar (chrome's version of firefox's firebug) and couldn't find anything relevant. Is there a common css bug that prevents me from shrinking the line-height beyond a certain minimum amount?
推荐答案
相对于font-size,除非你声明了负边距,否则你不能低于这个值。
line-height is relative to font-size, you can't go any lower than that unless you declare negative margin.
这篇关于为什么不是css属性'line-height'不让我做出真正紧密的线条空间,但在chrome中的宽的工作正常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!