line-height继承的三种状况

  1. line-height=20px
body {  line-height: 20px;  font-size: 30px;}p {  font-size: 16px;}

这时候p标签的line-height=20px,继承body的line-height=20px

  1. line-hieght=1.5

    body {  line-height: 1.5;  font-size: 30px;}p {  font-size: 16px;}

    这时候p标签的line-height=1.5,继承body的line-height=1.5。则p标签的line-height=16px * 1.5 = 24px

  2. line-hieght=200%

    body {  line-height: 200%;  font-size: 30px;}p {  font-size: 16px;}

    这时候p标签的line-height=60px,先计算body的line-height=200% = 200% * 30px = 60px。再p标签继承body的line-height=60px