在写静态小米官网的时候,突然遇到设置的div高度100%失效
最终找到一个解决办法
用相对定位来解决
<!DOCTYPE html>
<html >
<head>
<title>bsl.html</title>
</head>
<body>
<div class='title' style="background-color:yellow;height: 50px"></div>
<div class='content' style="background-color:red;min-height: 600px;width: 100%;position:relative;">
<div class='menu' style="background-color:blue;position:absolute;left:0;top:0;bottom:0;width:20%;">
</div>
</div>
</body>
</html>