FireFox 3 line-height

前端 未结 4 986
礼貌的吻别
礼貌的吻别 2021-01-04 19:46

Firefox 3 has introduced a new behavior in which line-height, when unset, differs from how other browsers render it. Thus, a critical section maybe render too high in that b

4条回答
  •  情歌与酒
    2021-01-04 20:08

    You CAN solve this:

    Set line height to 1, then zero in your text using padding-top and padding-bottom, and set height to auto.

    .zeroed_in_element {
        padding: 4px 2px 5px 2px;
        height: auto;
        line-height: 1;
    } 
    

提交回复
热议问题