gpt4 book ai didi

html - Css 高度百分比不起作用

转载 作者:技术小花猫 更新时间:2023-10-29 11:26:44 24 4
gpt4 key购买 nike

<分区>

我有以下简单代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
<title>Live Feed</title>

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>

<body>
<div style="background-color: #eeaabb; width: 250px; height: 100%; border-right: solid 1px #e1e1e1;">
I should be tall
</div>
</body>

</html>

但是当高度为 100% 时,div 不会显示。为什么?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com