css overflow hidden increases height of container

后端 未结 4 847
遥遥无期
遥遥无期 2021-01-31 09:09

Please have a look at this fiddle - http://jsfiddle.net/Z27hC/

var container = document.createElement(\'span\');
container.style.display = \'inline-block\';
cont         


        
4条回答
  •  离开以前
    2021-01-31 09:39

    The overflow-property can change the baseline of an element. To prevent this you can use vertical-align on inline-blocks.

    cell.style.display = 'inline-block';
    cell.style.overflow = 'hidden';
    cell.style.verticalAlign = 'bottom';
    

    http://jsfiddle.net/23e0rny9/

提交回复
热议问题