老师,为什么无法实现圣杯效果,甚至min-height也没有反应
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
padding:0;
margin:0;
}
body{
min-width:700px;
}
.head{
width:800px;
height:400px;
margin:0 auto;
position:relative;
}
.left{
width:200px;
height:400px;
background-color:red;
float:left;
position:relative;
top:-100%;
left:-200px;
}
.right{
width:200px;
height:400px;
background-color:green;
float:left;
position:relative;
top:-100%;
right:-600px;
}
.middle{
width:100%;
min-height:400px;
background-color:blue;
float:left;
position:relative;
}
</style>
</head>
<body>
<div class="head">
<div class="middle">中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间中间</div>
<div class="left">左边</div>
<div class="right">右边</div>
</div>
</body>
</html>
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星