我想让“shadow-repeat block”高度为 100%,而“shadow-up”与顶部对齐,“shadow-down”与底部对齐,两者都是固定高度,例如 200px
<div class="center">
<div class="right-shadow">
<div class="shadow-up"></div>
<div class="shadow-repeat"></div>
<div class="shadow-down"></div>
</div>
<div class="content">
</div><!--content-->
<div class="left-shadow">
<div class="shadow-up"></div>
<div class="shadow-repeat"></div>
<div class="shadow-down"></div>
</div>
</div><!--center-->
至于现在我没有得到正确的结果。如果有办法使它正确,请帮助。
.left-shadow{
width: 22px;
float: left;
position: absolute;
left: -22px;
top:0px;
height: 100%;
}
.right-shadow .shadow-up{
background: url('img/shadow-part-one.png') no-repeat -22px 0px transparent;
height: 257px;
}
.right-shadow .shadow-repeat{
height: 100%;
background: url('img/shadow-part-two.png') repeat-y -22px 0px transparent;
}
.right-shadow .shadow-down{
background: url('img/shadow-part-three.png') repeat-y -22px 0px transparent;
height: 260px;
}
.center{
margin-right: 20px;
margin-left: 20px;
position: relative;
float: left;
}
.content{
float: left;
width: 1100px;
}