2 回答
TA贡献1811条经验 获得超5个赞
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: blue;
margin: 0;
padding: 0;
background-color: black;
}
.Header {
height: 191px;
background: #808080;
border: 1px solid #000000;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
font-size: 30px;
}
.content {
display: flex;
}
.content__sidebar {
width: 200px;
min-height: 100%;
}
.content__sidebar--left {
background-color: red;
}
.content__sidebar--right {
background-color: green;
}
.content__main {
flex: 1;
}
.container {
background: #808080;
border: 1px solid #000000;
height: 190px;
}
.footer {
background: #808080;
border: 1px solid #000000;
height: 129px;
}
<div class="Header">
<h1> Header </h1>
</div>
<div class="content">
<div class="content__sidebar content__sidebar--left"></div>
<div class="content__main">
<div class="container">"
<p> Text </p>
</div>
<div class="container">
<p> Text </p>
</div>
<div class="container">
<p> text </p>
</div>
<div class="container">
<p> text </p>
</div>
</div>
<div class="content__sidebar content__sidebar--right"></div>
</div>
<div class="footer">
<p> footer </p>
</div>
TA贡献2065条经验 获得超13个赞
丑陋的方式: https: //codepen.io/stefantigro/pen/bGdZyeX
<div class="Header">
<h1> Header </h1>
</div>
<div class="">
<div class="right-side side">
</div>
<div class="middle">
<div class="container">
<p> Text </p>
</div>
<div class="container">
<p> Text </p>
</div>
<div class="container">
<p> text </p>
</div>
<div class="container">
<p> text </p>
</div>
<div class="footer">
<p> footer </p>
</div>
</div>
<div class="left-side side">
</div>
</div>
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: blue;
margin: 0;
padding: 0;
width: 100%;
background-color: black;
background-size: cover;
background-repeat: no-repeat;
}
.Header {
height: 191px;
background: #808080;
border: 1px solid #000000;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
font-size: 30px;
}
.contentwrap {
margin: 0 auto;
}
.container {
background: #808080;
border: 1px solid #000000;
height: 190px;
display: block;
}
.footer {
background: #808080;
border: 1px solid #000000;
height: 129px;
}
.middle
{
display: inline-block;
width: 60%;
height: 100%;
}
.right-side{
background: blue;
}
.left-side{
background: red;
}
.side{
margin: 0;
width: 19%;
height: 800px;
display: inline-block;
}
这里的问题是我们使用设定的尺寸,并且井的尺寸各不相同,尤其是从显示器到显示器。
- 2 回答
- 0 关注
- 102 浏览
添加回答
举报