Why does 100% equal 150 pixels?

后端 未结 2 1890
小蘑菇
小蘑菇 2021-01-17 05:22

The following code results in a table that 150 pixels tall. Why 150? Is this an SVG quirk or something more general?

https://jsfiddle.net/cc9tyw5v/31/



        
2条回答
  •  佛祖请我去吃肉
    2021-01-17 06:02

    The span you are attempting to fit the height of is not the parent of the SVG. It is a sibling, and therefore height:100% will not fit its height.

提交回复
热议问题