css - body, html 父div 都设置了height: 100%, 子元素也设置了,为什么高度还是内容高度?
PHPz
PHPz 2017-04-17 14:24:10
0
2
410

<html>

<body>
    <p>
        <p>左</p>
        <p>右</p>
    </p>
</body>

</html>

这样的结构
body, html 父p 都设置了height: 100%, 子元素也设置了height: 100%,
p左有效, 为什么p右的高度还是内容高度?

有什么样式会影响吗? 找不到原因.
右p只设置了这个样式

-webkit-transition: -webkit-transform .3s ease-in-out,margin .3s ease-in-out;
-moz-transition: -moz-transform .3s ease-in-out,margin .3s ease-in-out;
-o-transition: -o-transform .3s ease-in-out,margin .3s ease-in-out;
transition: transform .3s ease-in-out,margin .3s ease-in-out;
margin-left: 230px;
min-height: 100%;
z-index: 820;
PHPz
PHPz

学习是最好的投资!

répondre à tous(2)
伊谢尔伦

去掉min-height试试

洪涛

左右p用的浮动还是定位还是flex呢?

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!