我在绝望中试图画出这个简单的东西.两列垂直拉伸100%.这有可能吗?
这里有两次尝试
<html>
<head>
<title>Columns</title>
</head>
<body>
<style type="text/css">
.wrapper {font-size:900px;
width:1200px;
margin:0 auto;
}
.col1 {
width:600px;
height:100%;
float:left;
background:#f00;
}
.col2 {
width:600px;
height:100%;
float:left;
background:#00f;
}
</style>
<div class="wrapper">
<div class="col1"> C o l u m n 1 </div>
<div class="col2"> C ol u m n 2 </div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
和
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
<head>
<title>2 Column CSS Demo - Equal Height Columns with Cross-Browser CSS</title>
<style media="screen" …Run Code Online (Sandbox Code Playgroud) css ×1