【发布时间】:2015-10-21 02:54:22
【问题描述】:
我需要开发简单的图像框控件,主大图像和缩略图区域位于底部。这是我的代码
.frame{
height: 200px;
width: 200px;
}
.image{
height: 75%;
width: 100%;
background: red;
}
.thumbs{
height: 25%;
width: 100%;
background: blue;
}
.nav{
height: 100%;
width: 5%;
display: inline-block;
background: green;
}
.left{
float: left;
}
.right{
float: right;
}
.thumb-images{
display: inline-block;
overflow: hidden;
width: 90%;
height: 100%;
background: orange;
}
.thumb{
display: inline-block;
width: 50px;
height: 50px;
background: purple;
}
<div class='frame'>
<div class='image'></div>
<div class='thumbs'>
<div class='nav left'></div>
<div class='thumb-images'>
<div class='thumb'></div>
<div class='thumb'></div>
<div class='thumb'></div>
<div class='thumb'></div>
<div class='thumb'></div>
<div class='thumb'></div>
</div>
<div class='nav right'></div>
</div>
</div>
我需要拇指图像内容区域(橙色)来隐藏其溢出(紫色矩形代表图像)。我还需要水平滚动。我的标记有什么问题?
【问题讨论】:
-
我不知道你问的是什么问题。
-
您的图片占 25%,背景占 90% (90-(25x3)=15) 您想用剩余的 15% 做什么?把它藏起来?向两边展示?