美文网首页
元素竖向百分比设定的相对位置

元素竖向百分比设定的相对位置

作者: bestCindy | 来源:发表于2020-10-12 20:39 被阅读0次

元素竖向百分比设定是相对于容器的宽度

当按百分比设定一个元素的宽度时,它是相对于父容器的宽度计算的,对于一些表示竖向距离的属性,比如 padding-top, padding-bottom, margin-top, margin-bottom 等,当按百分比设定它们时,依据的也是父容器的宽度,而不是高度

相关文章

网友评论

      本文标题:元素竖向百分比设定的相对位置

      本文链接:https://www.haomeiwen.com/subject/gpvppktx.html