我为独立滚动面板创建了html,其中包含各个列的固定标题& 3列的页脚。
我已附上线框供您参考。
Q1:我的代码中是否有任何问题? Q2:响应式设计会出现问题吗?
html, body {
height: 99%;
box-sizing: border-box;
overflow: hidden;
margin: 0px;
}
.container {
max-height: 100%;
overflow: auto;
margin-top: 100px;
}
.col-1{
float: left;
width: 20%;
position: relative;
height: calc(100vh - 140px);
}
.col-2{
float: left;
width: 20%;
position: relative;
height: calc(100vh - 140px)
}
.col-3{
float: left;
width: 60%;
position: relative;
height: calc(100vh - 140px)
}
.header, .footer,.header2, .footer2 ,.header3, .footer3 {
height: 40px;
position: fixed;
margin-top: 60px;
}
.header {
top: 0;
left: 20%;
width:20%;
background-color: #dddddd;
}
.footer {
bottom: 0;
left: 20%;
width:20%;
background-color: #dddddd;
}
.header2 {
top: 0;
left: 0%;
width:20% ;
background-color: #eeeeee;
}
.footer2 {
bottom: 0;
left: 0;
width:20% ;
background-color: #eeeeee;
}
.header3 {
top: 0;
left: 40%;
width:60% ;
background-color: #cccccc;
}
.footer3 {
bottom: 0;
left: 40%;
width:60% ;
background-color: #cccccc;
}
header{ position: fixed; width: 100%; height: 60px; background: #666666 }
ul{ list-style: none; padding:0px; }
ul li { list-style-type: none; display: block; padding:20px 10px; margin:0px; border-bottom: 1px solid #dddddd }

<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<header>Header</header>
<div class="container col-1">
<div class="header">
Fixed Header
</div>
<ul>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
</ul>
<div class="footer">
Fixed footer
</div>
</div>
<div class="container col-2">
<div class="header2">
Fixed Header
</div>
<div class="content">
<ul>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
<li>Listing</li>
</ul>
</div>
<div class="footer2">
Fixed footer
</div>
</div>
<div class="container col-3">
<div class="header3">
Fixed Header
</div>
<div class="content">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="footer3">
Fixed footer
</div>
</div>
</body>
</html>
&#13;
答案 0 :(得分:0)
首先,您发布的问题不是stackoverflow所提供的问题。如果你坚持SO标准会更好。
看看我的笔。我通过查看你的线框图像来想出这个简单的布局。
以下是布局的骨架
<div class="main_container">
<!-- main container -->
<div class="header">
header
</div>
<div class="content">
<!-- content -->
<div class="content_left">
<!-- content_left -->
<div class="cl_head">
Fixed Header
</div>
<div class="cl_body">
</div>
<div class="cl_foot">
Fixed Footer
</div>
</div>
<div class="content_container">
<div class="content_center">
<!-- content_center -->
<div class="cc_head">
Fixed Header
</div>
<div class="cc_body">
</div>
</div>
<div class="content_right">
<!-- content_right -->
<div class="cr_head">
Fixed Header
</div>
<div class="cr_body">
</div>
</div>
</div>
</div>
</div>