本文主要是介绍【CSS】三栏布局,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
}
.left,.right{
width: 200px;
height: 100%;
}
.left{
background: #3f3f40;
float: left;
}
.right{
background: #3f3f40;
float: right;
}
.center{
width: calc(100% - 400px);
height: 100%;
background: #ccc;
float: left;
}
</style>
</head>
<body>
<div class="left"></div>
<div class="right"></div>
<div class="center"></div>
</body>
</html>
这篇关于【CSS】三栏布局的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!